H
- an implementation of NHttpClientEventHandler
.@Contract(threading=IMMUTABLE_CONDITIONAL) public class DefaultHttpClientIODispatch<H extends NHttpClientEventHandler> extends AbstractIODispatch<DefaultNHttpClientConnection>
IOEventDispatch
implementation
that supports both plain (non-encrypted) and SSL encrypted client side HTTP
connections.CONNECTION_KEY
Constructor and Description |
---|
DefaultHttpClientIODispatch(H handler,
ConnectionConfig config) |
DefaultHttpClientIODispatch(H handler,
HttpParams params)
Deprecated.
|
DefaultHttpClientIODispatch(H handler,
NHttpConnectionFactory<? extends DefaultNHttpClientConnection> connFactory)
Creates a new instance of this class to be used for dispatching I/O event
notifications to the given protocol handler.
|
DefaultHttpClientIODispatch(H handler,
SSLContext sslContext,
ConnectionConfig config) |
DefaultHttpClientIODispatch(H handler,
SSLContext sslContext,
HttpParams params)
Deprecated.
|
DefaultHttpClientIODispatch(H handler,
SSLContext sslContext,
SSLSetupHandler sslHandler,
ConnectionConfig config) |
DefaultHttpClientIODispatch(H handler,
SSLContext sslContext,
SSLSetupHandler sslHandler,
HttpParams params)
|
Modifier and Type | Method and Description |
---|---|
static <T extends NHttpClientEventHandler> |
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 NHttpClientEventHandler> |
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 DefaultNHttpClientConnection |
createConnection(IOSession session) |
NHttpConnectionFactory<? extends DefaultNHttpClientConnection> |
getConnectionFactory()
Gets the connection factory used to construct this dispatch.
|
H |
getHandler()
Gets the handler used to construct this dispatch.
|
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
public DefaultHttpClientIODispatch(H handler, NHttpConnectionFactory<? extends DefaultNHttpClientConnection> connFactory)
handler
- the client protocol handler.connFactory
- HTTP client connection factory.@Deprecated public DefaultHttpClientIODispatch(H handler, HttpParams params)
DefaultHttpClientIODispatch(
NHttpClientEventHandler, ConnectionConfig)
@Deprecated public DefaultHttpClientIODispatch(H handler, SSLContext sslContext, SSLSetupHandler sslHandler, HttpParams params)
@Deprecated public DefaultHttpClientIODispatch(H handler, SSLContext sslContext, HttpParams params)
DefaultHttpClientIODispatch(
NHttpClientEventHandler, SSLContext, ConnectionConfig)
public DefaultHttpClientIODispatch(H handler, ConnectionConfig config)
public DefaultHttpClientIODispatch(H handler, SSLContext sslContext, SSLSetupHandler sslHandler, ConnectionConfig config)
public DefaultHttpClientIODispatch(H handler, SSLContext sslContext, ConnectionConfig config)
public static <T extends NHttpClientEventHandler> DefaultHttpClientIODispatch<T> create(T 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 <T extends NHttpClientEventHandler> DefaultHttpClientIODispatch<T> create(T 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>
public NHttpConnectionFactory<? extends DefaultNHttpClientConnection> getConnectionFactory()
public H getHandler()
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>
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.