| Constructor and Description |
|---|
HttpClientConnectionHandler() |
HttpClientConnectionHandler(java.lang.Iterable<Servlett> servletts) |
HttpClientConnectionHandler(Servlett servlett) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<Servlett> |
getServletts() |
void |
handleConnection(java.io.InputStream in,
java.io.OutputStream out,
java.net.InetSocketAddress localSocketAddress,
java.net.InetSocketAddress remoteSocketAddress,
Stoppable stoppable)
This one is called from the
HttpServer. |
void |
handleConnection(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out,
java.net.InetSocketAddress localSocketAddress,
java.net.InetSocketAddress remoteSocketAddress,
Multiplexer multiplexer,
Stoppable stoppable)
This one is called from the
NioHttpServer. |
protected void |
processRequests(java.io.InputStream in,
java.io.OutputStream out,
Stoppable stoppable)
Processes HTTP requests from the client until the connection breaks.
|
void |
setServlett(Servlett servlett)
Clears the set of currently registerd
Servletts and registers the given servlett. |
void |
setServletts(java.lang.Iterable<Servlett> servletts)
Clears the set of currently registerd
Servletts and registers the given servletts. |
void |
stop()
Returns when this
Stoppable has completely stopped. |
public HttpClientConnectionHandler()
public HttpClientConnectionHandler(Servlett servlett)
public HttpClientConnectionHandler(java.lang.Iterable<Servlett> servletts)
public java.lang.Iterable<Servlett> getServletts()
Servletts currently registered with this HttpClientConnectionHandlerpublic void setServlett(Servlett servlett)
Servletts and registers the given servlett.public void setServletts(java.lang.Iterable<Servlett> servletts)
Servletts and registers the given servletts.public void handleConnection(java.io.InputStream in,
java.io.OutputStream out,
java.net.InetSocketAddress localSocketAddress,
java.net.InetSocketAddress remoteSocketAddress,
Stoppable stoppable)
throws java.io.IOException,
InvalidHttpMessageException
HttpServer. Override if you want to process the connection before
request processing begins.localSocketAddress - Could be examined by implementations that override this methodremoteSocketAddress - Could be examined by implementations that override this methodstoppable - Stopping this will break the connectionjava.io.IOExceptionInvalidHttpMessageExceptionpublic void handleConnection(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out,
java.net.InetSocketAddress localSocketAddress,
java.net.InetSocketAddress remoteSocketAddress,
Multiplexer multiplexer,
Stoppable stoppable)
throws java.io.IOException
NioHttpServer. Override if you want to process the connection before
request processing begins.localSocketAddress - Could be examined by implementations that override this methodremoteSocketAddress - Could be examined by implementations that override this methodstoppable - Stopping this will break the connectionjava.io.IOExceptionprotected void processRequests(java.io.InputStream in,
java.io.OutputStream out,
Stoppable stoppable)
throws java.io.IOException,
InvalidHttpMessageException
stoppable - Stopping this will break the connectionjava.io.IOExceptionInvalidHttpMessageException