org.apache.hc.client5.http.impl.io

## Class ManagedHttpClientConnectionFactory

- java.lang.Object
- - org.apache.hc.client5.http.impl.io.ManagedHttpClientConnectionFactory

- All Implemented Interfaces:
    HttpConnectionFactory<ManagedHttpClientConnection>

      @Contract(threading=STATELESS)
      public class ManagedHttpClientConnectionFactory
      extends Object
      implements HttpConnectionFactory<ManagedHttpClientConnection>

  Factory for `ManagedHttpClientConnection` instances.
  Since:
    4.3

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ManagedHttpClientConnectionFactory.Builder` Builder for `ManagedHttpClientConnectionFactory`.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ManagedHttpClientConnectionFactory` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedHttpClientConnectionFactory()`
    `ManagedHttpClientConnectionFactory(Http1Config h1Config, CharCodingConfig charCodingConfig, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)`
    `ManagedHttpClientConnectionFactory(Http1Config h1Config, CharCodingConfig charCodingConfig, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)`
    `ManagedHttpClientConnectionFactory(Http1Config h1Config, CharCodingConfig charCodingConfig, HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory, HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ManagedHttpClientConnectionFactory.Builder` | `builder()` Create a new `ManagedHttpClientConnectionFactory.Builder`.
    `ManagedHttpClientConnection` | `createConnection(Socket socket)`

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

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

- - ### Field Detail

    - #### INSTANCE

          public static final ManagedHttpClientConnectionFactory INSTANCE

  - ### Constructor Detail

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory(Http1Config h1Config,
                                                    CharCodingConfig charCodingConfig,
                                                    HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory,
                                                    HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory,
                                                    ContentLengthStrategy incomingContentStrategy,
                                                    ContentLengthStrategy outgoingContentStrategy)

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory(Http1Config h1Config,
                                                    CharCodingConfig charCodingConfig,
                                                    HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory,
                                                    HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory(Http1Config h1Config,
                                                    CharCodingConfig charCodingConfig,
                                                    HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory)

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory()

  - ### Method Detail

    - #### createConnection

          public ManagedHttpClientConnection createConnection(Socket socket)
                                                       throws IOException

      Specified by:
        `createConnection` in interface `HttpConnectionFactory<ManagedHttpClientConnection>`
      Throws:
        `IOException`

    - #### builder

          public static ManagedHttpClientConnectionFactory.Builder builder()

      Create a new `ManagedHttpClientConnectionFactory.Builder`.
      Since:
        5.1

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.