@Contract(threading=IMMUTABLE_CONDITIONAL) public class DefaultHttpClientIODispatch extends AbstractIODispatch<DefaultNHttpClientConnection>
IOEventDispatch
implementation
that supports both plain (non-encrypted) and SSL encrypted client side HTTP
connections.Modifier and Type | Field and Description |
---|---|
private NHttpConnectionFactory<DefaultNHttpClientConnection> |
connFactory |
private NHttpClientEventHandler |
handler |
CONNECTION_KEY
Constructor and Description |
---|
DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
ConnectionConfig config) |
DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
HttpParams params)
Deprecated.
|
DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
NHttpConnectionFactory<DefaultNHttpClientConnection> connFactory)
Creates a new instance of this class to be used for dispatching I/O event
notifications to the given protocol handler.
|
DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
SSLContext sslContext,
ConnectionConfig config) |
DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
SSLContext sslContext,
HttpParams params)
Deprecated.
|
DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
SSLContext sslContext,
SSLSetupHandler sslHandler,
ConnectionConfig config) |
DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
SSLContext sslContext,
SSLSetupHandler sslHandler,
HttpParams params)
|
Modifier and Type | Method and Description |
---|---|
static DefaultHttpClientIODispatch |
create(NHttpClientEventHandler 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 DefaultHttpClientIODispatch |
create(NHttpClientEventHandler 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 DefaultNHttpClientConnection |
createConnection(IOSession session) |
protected void |
onClosed(DefaultNHttpClientConnection conn) |
protected void |
onConnected(DefaultNHttpClientConnection conn) |
protected void |
onException(DefaultNHttpClientConnection conn,
IOException ex) |
protected void |
onInputReady(DefaultNHttpClientConnection conn) |
protected void |
onOutputReady(DefaultNHttpClientConnection conn) |
protected void |
onTimeout(DefaultNHttpClientConnection conn) |
connected, disconnected, inputReady, outputReady, timeout
private final NHttpClientEventHandler handler
private final NHttpConnectionFactory<DefaultNHttpClientConnection> connFactory
public DefaultHttpClientIODispatch(NHttpClientEventHandler handler, NHttpConnectionFactory<DefaultNHttpClientConnection> connFactory)
handler
- the client protocol handler.connFactory
- HTTP client connection factory.@Deprecated public DefaultHttpClientIODispatch(NHttpClientEventHandler handler, HttpParams params)
DefaultHttpClientIODispatch(
NHttpClientEventHandler, ConnectionConfig)
@Deprecated public DefaultHttpClientIODispatch(NHttpClientEventHandler handler, SSLContext sslContext, SSLSetupHandler sslHandler, HttpParams params)
@Deprecated public DefaultHttpClientIODispatch(NHttpClientEventHandler handler, SSLContext sslContext, HttpParams params)
DefaultHttpClientIODispatch(
NHttpClientEventHandler, SSLContext, ConnectionConfig)
public DefaultHttpClientIODispatch(NHttpClientEventHandler handler, ConnectionConfig config)
public DefaultHttpClientIODispatch(NHttpClientEventHandler handler, SSLContext sslContext, SSLSetupHandler sslHandler, ConnectionConfig config)
public DefaultHttpClientIODispatch(NHttpClientEventHandler handler, SSLContext sslContext, ConnectionConfig config)
public static DefaultHttpClientIODispatch create(NHttpClientEventHandler handler, SSLContext sslContext, ConnectionConfig config)
handler
- the client protocol handler.sslContext
- an SSLContext or null (for a plain text connection.)config
- a connection configurationpublic static DefaultHttpClientIODispatch create(NHttpClientEventHandler handler, SSLContext sslContext, SSLSetupHandler sslHandler, ConnectionConfig config)
handler
- the client 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 DefaultNHttpClientConnection createConnection(IOSession session)
createConnection
in class AbstractIODispatch<DefaultNHttpClientConnection>
protected void onConnected(DefaultNHttpClientConnection conn)
onConnected
in class AbstractIODispatch<DefaultNHttpClientConnection>
protected void onClosed(DefaultNHttpClientConnection conn)
onClosed
in class AbstractIODispatch<DefaultNHttpClientConnection>
protected void onException(DefaultNHttpClientConnection conn, IOException ex)
onException
in class AbstractIODispatch<DefaultNHttpClientConnection>
protected void onInputReady(DefaultNHttpClientConnection conn)
onInputReady
in class AbstractIODispatch<DefaultNHttpClientConnection>
protected void onOutputReady(DefaultNHttpClientConnection conn)
onOutputReady
in class AbstractIODispatch<DefaultNHttpClientConnection>
protected void onTimeout(DefaultNHttpClientConnection conn)
onTimeout
in class AbstractIODispatch<DefaultNHttpClientConnection>
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses