TcpServer
and pass it an HttpClientConnectionHandler
@Deprecated public final class HttpServer extends Object implements de.unkrig.commons.lang.protocol.RunnableWhichThrows<IOException>, de.unkrig.commons.lang.protocol.Stoppable
Constructor and Description |
---|
HttpServer(InetSocketAddress endpoint,
HttpClientConnectionHandler httpClientConnectionHandler)
Deprecated.
This
HttpServer will accept connections on the endpoint and will handle each with the
httpClientConnectionHandler. |
HttpServer(InetSocketAddress endpoint,
SSLContext sslContext,
HttpClientConnectionHandler httpClientConnectionHandler)
Deprecated.
This
HttpServer will accept secure (HTTPS) connections on the endpoint and will handle each
with the httpClientConnectionHandler. |
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getEndpointAddress()
Deprecated.
|
void |
run()
Deprecated.
|
void |
stop()
Deprecated.
|
public HttpServer(InetSocketAddress endpoint, HttpClientConnectionHandler httpClientConnectionHandler) throws IOException
HttpServer
will accept connections on the endpoint and will handle each with the
httpClientConnectionHandler.endpoint
- The InetAddress
and local port the server will bind to; InetSocketAddress.InetSocketAddress(int)
will accept connections on any/all local addresses;
port number zero will pick an ephemeral portIOException
public HttpServer(InetSocketAddress endpoint, SSLContext sslContext, HttpClientConnectionHandler httpClientConnectionHandler) throws IOException
HttpServer
will accept secure (HTTPS) connections on the endpoint and will handle each
with the httpClientConnectionHandler.endpoint
- The InetAddress
and local port the server will bind to; InetSocketAddress.InetSocketAddress(int)
will accept connections on any/all local addresses;
port number zero will pick an ephemeral portIOException
public void run() throws IOException
run
in interface de.unkrig.commons.lang.protocol.RunnableWhichThrows<IOException>
IOException
public void stop()
stop
in interface de.unkrig.commons.lang.protocol.Stoppable
public InetSocketAddress getEndpointAddress()
TcpServer.getEndpointAddress()
Copyright © 2018 Arno Unkrig. All rights reserved.