org.apache.http.impl.nio

## Class DefaultNHttpClientConnectionFactory

- java.lang.Object
- - org.apache.http.impl.nio.DefaultNHttpClientConnectionFactory

All Implemented Interfaces:
  NHttpConnectionFactory<DefaultNHttpClientConnection>

    @Immutable
    public class DefaultNHttpClientConnectionFactory
    extends Object
    implements NHttpConnectionFactory<DefaultNHttpClientConnection>

Default factory for plain (non-encrypted), non-blocking `NHttpClientConnection`s.

Since:
  4.2

### Field Summary

Fields
`static DefaultNHttpClientConnectionFactory` `INSTANCE`

### Constructor Summary

Constructors
Constructor and Description
`DefaultNHttpClientConnectionFactory()`
`DefaultNHttpClientConnectionFactory(ConnectionConfig cconfig)`
`DefaultNHttpClientConnectionFactory(ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, NHttpMessageParserFactory<HttpResponse> responseParserFactory, NHttpMessageWriterFactory<HttpRequest> requestWriterFactory, ByteBufferAllocator allocator, ConnectionConfig cconfig)`
`DefaultNHttpClientConnectionFactory(HttpParams params)` Deprecated. (4.3) use `DefaultNHttpClientConnectionFactory( ConnectionConfig)`
`DefaultNHttpClientConnectionFactory(HttpResponseFactory responseFactory, ByteBufferAllocator allocator, HttpParams params)` Deprecated. (4.3) use `DefaultNHttpClientConnectionFactory( NHttpMessageParserFactory, NHttpMessageWriterFactory, ByteBufferAllocator, ConnectionConfig)`
`DefaultNHttpClientConnectionFactory(NHttpMessageParserFactory<HttpResponse> responseParserFactory, NHttpMessageWriterFactory<HttpRequest> requestWriterFactory, ByteBufferAllocator allocator, ConnectionConfig cconfig)`
`DefaultNHttpClientConnectionFactory(NHttpMessageParserFactory<HttpResponse> responseParserFactory, NHttpMessageWriterFactory<HttpRequest> requestWriterFactory, ConnectionConfig cconfig)`

### Method Summary

Methods
`DefaultNHttpClientConnection` `createConnection(IOSession session)`
`protected DefaultNHttpClientConnection` `createConnection(IOSession session, HttpResponseFactory responseFactory, ByteBufferAllocator allocator, HttpParams params)` Deprecated. (4.3) no longer used.

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

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

### Field Detail

#### INSTANCE

    public static final DefaultNHttpClientConnectionFactory INSTANCE

### Constructor Detail

#### DefaultNHttpClientConnectionFactory

    @Deprecated
    public DefaultNHttpClientConnectionFactory(HttpResponseFactory responseFactory,
                                                  ByteBufferAllocator allocator,
                                                  HttpParams params)

Deprecated. (4.3) use `DefaultNHttpClientConnectionFactory( NHttpMessageParserFactory, NHttpMessageWriterFactory, ByteBufferAllocator, ConnectionConfig)`

#### DefaultNHttpClientConnectionFactory

    @Deprecated
    public DefaultNHttpClientConnectionFactory(HttpParams params)

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

#### DefaultNHttpClientConnectionFactory

    public DefaultNHttpClientConnectionFactory(ContentLengthStrategy incomingContentStrategy,
                                       ContentLengthStrategy outgoingContentStrategy,
                                       NHttpMessageParserFactory<HttpResponse> responseParserFactory,
                                       NHttpMessageWriterFactory<HttpRequest> requestWriterFactory,
                                       ByteBufferAllocator allocator,
                                       ConnectionConfig cconfig)

Since:
  4.3

#### DefaultNHttpClientConnectionFactory

    public DefaultNHttpClientConnectionFactory(NHttpMessageParserFactory<HttpResponse> responseParserFactory,
                                       NHttpMessageWriterFactory<HttpRequest> requestWriterFactory,
                                       ByteBufferAllocator allocator,
                                       ConnectionConfig cconfig)

Since:
  4.3

#### DefaultNHttpClientConnectionFactory

    public DefaultNHttpClientConnectionFactory(NHttpMessageParserFactory<HttpResponse> responseParserFactory,
                                       NHttpMessageWriterFactory<HttpRequest> requestWriterFactory,
                                       ConnectionConfig cconfig)

Since:
  4.3

#### DefaultNHttpClientConnectionFactory

    public DefaultNHttpClientConnectionFactory(ConnectionConfig cconfig)

Since:
  4.3

#### DefaultNHttpClientConnectionFactory

    public DefaultNHttpClientConnectionFactory()

Since:
  4.3

### Method Detail

#### createConnection

    @Deprecated
    protected DefaultNHttpClientConnection createConnection(IOSession session,
                                                           HttpResponseFactory responseFactory,
                                                           ByteBufferAllocator allocator,
                                                           HttpParams params)

Deprecated. (4.3) no longer used.

#### createConnection

    public DefaultNHttpClientConnection createConnection(IOSession session)

Specified by:
  `createConnection` in interface `NHttpConnectionFactory<DefaultNHttpClientConnection>`