org.apache.http.impl.nio

## Class DefaultHttpClientIODispatch

- java.lang.Object
- - org.apache.http.impl.nio.reactor.AbstractIODispatch<DefaultNHttpClientConnection>
  - - org.apache.http.impl.nio.DefaultHttpClientIODispatch

All Implemented Interfaces:
  IOEventDispatch

    @Immutable
    public class DefaultHttpClientIODispatch
    extends AbstractIODispatch<DefaultNHttpClientConnection>

Default `IOEventDispatch` implementation that supports both plain (non-encrypted) and SSL encrypted client side HTTP connections.

Since:
  4.2

### Field Summary

### Fields inherited from interface org.apache.http.nio.reactor.IOEventDispatch

`CONNECTION_KEY`

### Constructor Summary

Constructors
Constructor and Description
`DefaultHttpClientIODispatch(NHttpClientEventHandler handler, ConnectionConfig config)`
`DefaultHttpClientIODispatch(NHttpClientEventHandler handler, HttpParams params)` Deprecated. (4.3) use `DefaultHttpClientIODispatch( NHttpClientEventHandler, ConnectionConfig)`
`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. (4.3) use `DefaultHttpClientIODispatch( NHttpClientEventHandler, SSLContext, ConnectionConfig)`
`DefaultHttpClientIODispatch(NHttpClientEventHandler handler, SSLContext sslcontext, SSLSetupHandler sslHandler, ConnectionConfig config)`
`DefaultHttpClientIODispatch(NHttpClientEventHandler handler, SSLContext sslcontext, SSLSetupHandler sslHandler, HttpParams params)` Deprecated. (4.3) use `DefaultHttpClientIODispatch( NHttpClientEventHandler, SSLContext, SSLSetupHandler, ConnectionConfig)`

### Method Summary

Methods
`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)`

### Methods inherited from class org.apache.http.impl.nio.reactor.AbstractIODispatch

`connected, disconnected, inputReady, outputReady, timeout`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultHttpClientIODispatch

    public 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.

Parameters:
  `handler` - the client protocol handler.
  `connFactory` - HTTP client connection factory.

#### DefaultHttpClientIODispatch

    @Deprecated
    public DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
                                          HttpParams params)

Deprecated. (4.3) use `DefaultHttpClientIODispatch( NHttpClientEventHandler, ConnectionConfig)`

#### DefaultHttpClientIODispatch

    @Deprecated
    public DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
                                          SSLContext sslcontext,
                                          SSLSetupHandler sslHandler,
                                          HttpParams params)

Deprecated. (4.3) use `DefaultHttpClientIODispatch( NHttpClientEventHandler, SSLContext, SSLSetupHandler, ConnectionConfig)`

#### DefaultHttpClientIODispatch

    @Deprecated
    public DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
                                          SSLContext sslcontext,
                                          HttpParams params)

Deprecated. (4.3) use `DefaultHttpClientIODispatch( NHttpClientEventHandler, SSLContext, ConnectionConfig)`

#### DefaultHttpClientIODispatch

    public DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
                               ConnectionConfig config)

Since:
  4.3

#### DefaultHttpClientIODispatch

    public DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
                               SSLContext sslcontext,
                               SSLSetupHandler sslHandler,
                               ConnectionConfig config)

Since:
  4.3

#### DefaultHttpClientIODispatch

    public DefaultHttpClientIODispatch(NHttpClientEventHandler handler,
                               SSLContext sslcontext,
                               ConnectionConfig config)

Since:
  4.3

### Method Detail

#### createConnection

    protected DefaultNHttpClientConnection createConnection(IOSession session)

Specified by:
  `createConnection` in class `AbstractIODispatch<DefaultNHttpClientConnection>`

#### onConnected

    protected void onConnected(DefaultNHttpClientConnection conn)

Specified by:
  `onConnected` in class `AbstractIODispatch<DefaultNHttpClientConnection>`

#### onClosed

    protected void onClosed(DefaultNHttpClientConnection conn)

Specified by:
  `onClosed` in class `AbstractIODispatch<DefaultNHttpClientConnection>`

#### onException

    protected void onException(DefaultNHttpClientConnection conn,
                   IOException ex)

Specified by:
  `onException` in class `AbstractIODispatch<DefaultNHttpClientConnection>`

#### onInputReady

    protected void onInputReady(DefaultNHttpClientConnection conn)

Specified by:
  `onInputReady` in class `AbstractIODispatch<DefaultNHttpClientConnection>`

#### onOutputReady

    protected void onOutputReady(DefaultNHttpClientConnection conn)

Specified by:
  `onOutputReady` in class `AbstractIODispatch<DefaultNHttpClientConnection>`

#### onTimeout

    protected void onTimeout(DefaultNHttpClientConnection conn)

Specified by:
  `onTimeout` in class `AbstractIODispatch<DefaultNHttpClientConnection>`