org.apache.http.impl.nio.pool

## Class BasicNIOConnFactory

- java.lang.Object
- - org.apache.http.impl.nio.pool.BasicNIOConnFactory

- All Implemented Interfaces:
    NIOConnFactory<HttpHost,NHttpClientConnection>

      @Immutable
      public class BasicNIOConnFactory
      extends Object
      implements NIOConnFactory<HttpHost,NHttpClientConnection>

  A basic `NIOConnFactory` implementation that creates `NHttpClientConnection` instances given a `HttpHost` instance.
  Since:
    4.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicNIOConnFactory(ConnectionConfig config)`
    `BasicNIOConnFactory(HttpParams params)` Deprecated. (4.3) use `BasicNIOConnFactory(ConnectionConfig)`
    `BasicNIOConnFactory(NHttpConnectionFactory<? extends NHttpClientConnection> plainFactory)`
    `BasicNIOConnFactory(NHttpConnectionFactory<? extends NHttpClientConnection> plainFactory, NHttpConnectionFactory<? extends NHttpClientConnection> sslFactory)`
    `BasicNIOConnFactory(SSLContext sslcontext, SSLSetupHandler sslHandler, ConnectionConfig config)`
    `BasicNIOConnFactory(SSLContext sslcontext, SSLSetupHandler sslHandler, HttpParams params)` Deprecated. (4.3) use `BasicNIOConnFactory(SSLContext, SSLSetupHandler, ConnectionConfig)`
    `BasicNIOConnFactory(SSLContext sslcontext, SSLSetupHandler sslHandler, HttpResponseFactory responseFactory, ByteBufferAllocator allocator, HttpParams params)` Deprecated. (4.3) use `BasicNIOConnFactory(SSLContext, SSLSetupHandler, NHttpMessageParserFactory, NHttpMessageWriterFactory, ByteBufferAllocator, ConnectionConfig)`
    `BasicNIOConnFactory(SSLContext sslcontext, SSLSetupHandler sslHandler, NHttpMessageParserFactory<HttpResponse> responseParserFactory, NHttpMessageWriterFactory<HttpRequest> requestWriterFactory, ByteBufferAllocator allocator, ConnectionConfig config)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NHttpClientConnection` | `create(HttpHost route, IOSession session)`

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

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

- - ### Constructor Detail

    - #### BasicNIOConnFactory

          public BasicNIOConnFactory(NHttpConnectionFactory<? extends NHttpClientConnection> plainFactory,
                             NHttpConnectionFactory<? extends NHttpClientConnection> sslFactory)

    - #### BasicNIOConnFactory

          public BasicNIOConnFactory(NHttpConnectionFactory<? extends NHttpClientConnection> plainFactory)

    - #### BasicNIOConnFactory

          @Deprecated
          public BasicNIOConnFactory(SSLContext sslcontext,
                                        SSLSetupHandler sslHandler,
                                        HttpResponseFactory responseFactory,
                                        ByteBufferAllocator allocator,
                                        HttpParams params)

      Deprecated. (4.3) use `BasicNIOConnFactory(SSLContext, SSLSetupHandler, NHttpMessageParserFactory, NHttpMessageWriterFactory, ByteBufferAllocator, ConnectionConfig)`

    - #### BasicNIOConnFactory

          @Deprecated
          public BasicNIOConnFactory(SSLContext sslcontext,
                                        SSLSetupHandler sslHandler,
                                        HttpParams params)

      Deprecated. (4.3) use `BasicNIOConnFactory(SSLContext, SSLSetupHandler, ConnectionConfig)`

    - #### BasicNIOConnFactory

          @Deprecated
          public BasicNIOConnFactory(HttpParams params)

      Deprecated. (4.3) use `BasicNIOConnFactory(ConnectionConfig)`

    - #### BasicNIOConnFactory

          public BasicNIOConnFactory(SSLContext sslcontext,
                             SSLSetupHandler sslHandler,
                             NHttpMessageParserFactory<HttpResponse> responseParserFactory,
                             NHttpMessageWriterFactory<HttpRequest> requestWriterFactory,
                             ByteBufferAllocator allocator,
                             ConnectionConfig config)

      Since:
        4.3

    - #### BasicNIOConnFactory

          public BasicNIOConnFactory(SSLContext sslcontext,
                             SSLSetupHandler sslHandler,
                             ConnectionConfig config)

      Since:
        4.3

    - #### BasicNIOConnFactory

          public BasicNIOConnFactory(ConnectionConfig config)

      Since:
        4.3

  - ### Method Detail

    - #### create

          public NHttpClientConnection create(HttpHost route,
                                     IOSession session)
                                       throws IOException

      Specified by:
        `create` in interface `NIOConnFactory<HttpHost,NHttpClientConnection>`
      Throws:
        `IOException`

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