org.apache.http.impl.nio

## Class DefaultClientIOEventDispatch

- java.lang.Object
- - org.apache.http.impl.nio.reactor.AbstractIODispatch<NHttpClientIOTarget>
  - - org.apache.http.impl.nio.DefaultClientIOEventDispatch

- All Implemented Interfaces:
    IOEventDispatch
  Direct Known Subclasses:
    SSLClientIOEventDispatch

  Deprecated.
  (4.2) use `DefaultHttpClientIODispatch`

      @Deprecated
      @Immutable
      public class DefaultClientIOEventDispatch
      extends AbstractIODispatch<NHttpClientIOTarget>

  Default implementation of `IOEventDispatch` interface for plain (unencrypted) client-side HTTP connections.
  Since:
    4.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ByteBufferAllocator` | `allocator` Deprecated.
    `protected NHttpClientHandler` | `handler` Deprecated.
    `protected HttpParams` | `params` Deprecated.

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

      `CONNECTION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultClientIOEventDispatch(NHttpClientHandler handler, HttpParams params)` Deprecated. Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ByteBufferAllocator` | `createByteBufferAllocator()` Deprecated. Creates an instance of `HeapByteBufferAllocator` to be used by HTTP connections for allocating `ByteBuffer` objects.
    `protected NHttpClientIOTarget` | `createConnection(IOSession session)` Deprecated. Creates an instance of `DefaultNHttpClientConnection` based on the given `IOSession`.
    `protected HttpResponseFactory` | `createHttpResponseFactory()` Deprecated. Creates an instance of `DefaultHttpResponseFactory` to be used by HTTP connections for creating `HttpResponse` objects.
    `protected void` | `onClosed(NHttpClientIOTarget conn)` Deprecated.
    `protected void` | `onConnected(NHttpClientIOTarget conn)` Deprecated.
    `protected void` | `onException(NHttpClientIOTarget conn, IOException ex)` Deprecated.
    `protected void` | `onInputReady(NHttpClientIOTarget conn)` Deprecated.
    `protected void` | `onOutputReady(NHttpClientIOTarget conn)` Deprecated.
    `protected void` | `onTimeout(NHttpClientIOTarget conn)` Deprecated.

    - ### 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`

- - ### Field Detail

    - #### handler

          protected final NHttpClientHandler handler

      Deprecated.

    - #### allocator

          protected final ByteBufferAllocator allocator

      Deprecated.

    - #### params

          protected final HttpParams params

      Deprecated.

  - ### Constructor Detail

    - #### DefaultClientIOEventDispatch

          public DefaultClientIOEventDispatch(NHttpClientHandler handler,
                                      HttpParams params)

      Deprecated.
      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.
        `params` - HTTP parameters.

  - ### Method Detail

    - #### createByteBufferAllocator

          protected ByteBufferAllocator createByteBufferAllocator()

      Deprecated.
      Creates an instance of `HeapByteBufferAllocator` to be used by HTTP connections for allocating `ByteBuffer` objects.

      This method can be overridden in a super class in order to provide a different implementation of the `ByteBufferAllocator` interface.

      Returns:
        byte buffer allocator.

    - #### createHttpResponseFactory

          protected HttpResponseFactory createHttpResponseFactory()

      Deprecated.
      Creates an instance of `DefaultHttpResponseFactory` to be used by HTTP connections for creating `HttpResponse` objects.

      This method can be overridden in a super class in order to provide a different implementation of the `HttpResponseFactory` interface.

      Returns:
        HTTP response factory.

    - #### createConnection

          protected NHttpClientIOTarget createConnection(IOSession session)

      Deprecated.
      Creates an instance of `DefaultNHttpClientConnection` based on the given `IOSession`.

      This method can be overridden in a super class in order to provide a different implementation of the `NHttpClientIOTarget` interface.

      Specified by:
        `createConnection` in class `AbstractIODispatch<NHttpClientIOTarget>`
      Parameters:
        `session` - the underlying I/O session.
      Returns:
        newly created HTTP connection.

    - #### onConnected

          protected void onConnected(NHttpClientIOTarget conn)

      Deprecated.
      Specified by:
        `onConnected` in class `AbstractIODispatch<NHttpClientIOTarget>`

    - #### onClosed

          protected void onClosed(NHttpClientIOTarget conn)

      Deprecated.
      Specified by:
        `onClosed` in class `AbstractIODispatch<NHttpClientIOTarget>`

    - #### onException

          protected void onException(NHttpClientIOTarget conn,
                         IOException ex)

      Deprecated.
      Specified by:
        `onException` in class `AbstractIODispatch<NHttpClientIOTarget>`

    - #### onInputReady

          protected void onInputReady(NHttpClientIOTarget conn)

      Deprecated.
      Specified by:
        `onInputReady` in class `AbstractIODispatch<NHttpClientIOTarget>`

    - #### onOutputReady

          protected void onOutputReady(NHttpClientIOTarget conn)

      Deprecated.
      Specified by:
        `onOutputReady` in class `AbstractIODispatch<NHttpClientIOTarget>`

    - #### onTimeout

          protected void onTimeout(NHttpClientIOTarget conn)

      Deprecated.
      Specified by:
        `onTimeout` in class `AbstractIODispatch<NHttpClientIOTarget>`

Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.