H
- an implementation of NHttpServerEventHandler
.@Contract(threading=IMMUTABLE_CONDITIONAL) public class DefaultHttpServerIODispatch<H extends NHttpServerEventHandler> extends AbstractIODispatch<DefaultNHttpServerConnection>
IOEventDispatch
implementation
that supports both plain (non-encrypted) and SSL encrypted server side HTTP
connections.CONNECTION_KEY
Constructor and Description |
---|
DefaultHttpServerIODispatch(H handler,
ConnectionConfig config) |
DefaultHttpServerIODispatch(H handler,
HttpParams params)
Deprecated.
|
DefaultHttpServerIODispatch(H handler,
NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connFactory) |
DefaultHttpServerIODispatch(H handler,
SSLContext sslContext,
ConnectionConfig config) |
DefaultHttpServerIODispatch(H handler,
SSLContext sslContext,
HttpParams params)
Deprecated.
|
DefaultHttpServerIODispatch(H handler,
SSLContext sslContext,
SSLSetupHandler sslHandler,
ConnectionConfig config) |
DefaultHttpServerIODispatch(H handler,
SSLContext sslContext,
SSLSetupHandler sslHandler,
HttpParams params)
|
Modifier and Type | Method and Description |
---|---|
static <T extends NHttpServerEventHandler> |
create(T handler,
SSLContext sslContext,
ConnectionConfig config)
Creates a new instance of this class to be used for dispatching I/O event
notifications to the given protocol handler.
|
static <T extends NHttpServerEventHandler> |
create(T eventHandler,
SSLContext sslContext,
ConnectionConfig config,
HttpRequestFactory httpRequestFactory)
Creates a new instance of this class to be used for dispatching I/O event
notifications to the given protocol handler.
|
static <T extends NHttpServerEventHandler> |
create(T handler,
SSLContext sslContext,
SSLSetupHandler sslHandler,
ConnectionConfig config)
Creates a new instance of this class to be used for dispatching I/O event
notifications to the given protocol handler.
|
protected DefaultNHttpServerConnection |
createConnection(IOSession session) |
NHttpConnectionFactory<? extends DefaultNHttpServerConnection> |
getConnectionFactory()
Gets the connection factory used to construct this dispatch.
|
H |
getHandler()
Gets the handler used to construct this dispatch.
|
protected void |
onClosed(DefaultNHttpServerConnection conn) |
protected void |
onConnected(DefaultNHttpServerConnection conn) |
protected void |
onException(DefaultNHttpServerConnection conn,
IOException ex) |
protected void |
onInputReady(DefaultNHttpServerConnection conn) |
protected void |
onOutputReady(DefaultNHttpServerConnection conn) |
protected void |
onTimeout(DefaultNHttpServerConnection conn) |
connected, disconnected, inputReady, outputReady, timeout
public DefaultHttpServerIODispatch(H handler, NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connFactory)
@Deprecated public DefaultHttpServerIODispatch(H handler, HttpParams params)
DefaultHttpServerIODispatch(
NHttpServerEventHandler, ConnectionConfig)
@Deprecated public DefaultHttpServerIODispatch(H handler, SSLContext sslContext, SSLSetupHandler sslHandler, HttpParams params)
@Deprecated public DefaultHttpServerIODispatch(H handler, SSLContext sslContext, HttpParams params)
DefaultHttpServerIODispatch(
NHttpServerEventHandler, SSLContext, ConnectionConfig)
public DefaultHttpServerIODispatch(H handler, ConnectionConfig config)
public DefaultHttpServerIODispatch(H handler, SSLContext sslContext, SSLSetupHandler sslHandler, ConnectionConfig config)
public DefaultHttpServerIODispatch(H handler, SSLContext sslContext, ConnectionConfig config)
public static <T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T> create(T handler, SSLContext sslContext, ConnectionConfig config)
handler
- the server protocol handler.sslContext
- an SSLContext or null (for a plain text connection.)config
- a connection configurationpublic static <T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T> create(T eventHandler, SSLContext sslContext, ConnectionConfig config, HttpRequestFactory httpRequestFactory)
eventHandler
- the server protocol handler.sslContext
- an SSLContext or null (for a plain text connection.)config
- a connection configurationhttpRequestFactory
- the request factory used by this object to generate HttpRequest
instances.public static <T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T> create(T handler, SSLContext sslContext, SSLSetupHandler sslHandler, ConnectionConfig config)
handler
- the server protocol handler.sslContext
- an SSLContext or null (for a plain text connection.)sslHandler
- customizes various aspects of the TLS/SSL protocol.config
- a connection configurationprotected DefaultNHttpServerConnection createConnection(IOSession session)
createConnection
in class AbstractIODispatch<DefaultNHttpServerConnection>
public NHttpConnectionFactory<? extends DefaultNHttpServerConnection> getConnectionFactory()
public H getHandler()
protected void onConnected(DefaultNHttpServerConnection conn)
onConnected
in class AbstractIODispatch<DefaultNHttpServerConnection>
protected void onClosed(DefaultNHttpServerConnection conn)
onClosed
in class AbstractIODispatch<DefaultNHttpServerConnection>
protected void onException(DefaultNHttpServerConnection conn, IOException ex)
onException
in class AbstractIODispatch<DefaultNHttpServerConnection>
protected void onInputReady(DefaultNHttpServerConnection conn)
onInputReady
in class AbstractIODispatch<DefaultNHttpServerConnection>
protected void onOutputReady(DefaultNHttpServerConnection conn)
onOutputReady
in class AbstractIODispatch<DefaultNHttpServerConnection>
protected void onTimeout(DefaultNHttpServerConnection conn)
onTimeout
in class AbstractIODispatch<DefaultNHttpServerConnection>
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.