public final class HttpServer extends java.lang.Object implements RunnableWhichThrows<java.io.IOException>, Stoppable
| Constructor and Description |
|---|
HttpServer(java.net.InetSocketAddress endpoint,
HttpClientConnectionHandler httpClientConnectionHandler)
Accepts connections on the
endpoint; obtains a new Servlett from the
httpClientConnectionHandlerFactory for each accepted connection, and then calls
Servlett.handleRequest(HttpRequest) for each received request. |
| Modifier and Type | Method and Description |
|---|---|
java.net.InetSocketAddress |
getEndpointAddress() |
void |
run()
"To run" an instance means to call this method and wait until it returns.
|
void |
stop()
Returns when this
Stoppable has completely stopped. |
public HttpServer(java.net.InetSocketAddress endpoint,
HttpClientConnectionHandler httpClientConnectionHandler)
throws java.io.IOException
endpoint; obtains a new Servlett from the
httpClientConnectionHandlerFactory for each accepted connection, and then calls
Servlett.handleRequest(HttpRequest) for each received request.java.io.IOExceptionpublic void run()
throws java.io.IOException
RunnableWhichThrowsrun in interface RunnableWhichThrows<java.io.IOException>java.io.IOExceptionpublic void stop()
StoppableStoppable has completely stopped.public java.net.InetSocketAddress getEndpointAddress()
TcpServer.getEndpointAddress()