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

## Class ManagedHttpClientConnectionFactory

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

- All Implemented Interfaces:
    org.apache.hc.core5.http.io.HttpConnectionFactory<ManagedHttpClientConnection>

      @Contract(threading=STATELESS)
      public class ManagedHttpClientConnectionFactory
      extends Object
      implements org.apache.hc.core5.http.io.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` Default instance of `ManagedHttpClientConnectionFactory`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedHttpClientConnectionFactory()`
    `ManagedHttpClientConnectionFactory(org.apache.hc.core5.http.config.Http1Config h1Config, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory)`
    `ManagedHttpClientConnectionFactory(org.apache.hc.core5.http.config.Http1Config h1Config, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory, org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory)`
    `ManagedHttpClientConnectionFactory(org.apache.hc.core5.http.config.Http1Config h1Config, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory, org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory, org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy, org.apache.hc.core5.http.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`

    - ### Methods inherited from interface org.apache.hc.core5.http.io.HttpConnectionFactory

      `createConnection`

- - ### Field Detail

    - #### INSTANCE

          public static final ManagedHttpClientConnectionFactory INSTANCE

      Default instance of `ManagedHttpClientConnectionFactory`.

  - ### Constructor Detail

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory(org.apache.hc.core5.http.config.Http1Config h1Config,
                                                    org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig,
                                                    org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory,
                                                    org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory,
                                                    org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy,
                                                    org.apache.hc.core5.http.ContentLengthStrategy outgoingContentStrategy)

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory(org.apache.hc.core5.http.config.Http1Config h1Config,
                                                    org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig,
                                                    org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory,
                                                    org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory)

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory(org.apache.hc.core5.http.config.Http1Config h1Config,
                                                    org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig,
                                                    org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory)

    - #### ManagedHttpClientConnectionFactory

          public ManagedHttpClientConnectionFactory()

  - ### Method Detail

    - #### createConnection

          public ManagedHttpClientConnection createConnection(Socket socket)
                                                       throws IOException

      Specified by:
        `createConnection` in interface `org.apache.hc.core5.http.io.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.