Use of httpserver

http://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/overview-summary.html

Programmers must implement the HttpHandler interface. This interface provides a callback which is invoked to handle incoming requests from clients. A HTTP request and its response is kNown as an exchange. HTTP exchanges are represented by the HttpExchange class. The HttpServer class is used to listen for incoming TCP connections and it dispatches requests on these connections to handlers which have been registered with the server. A minimal Http server example is shown below: class MyHandler implements HttpHandler {

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>