org.apache.hc.client5.http.impl.nio

## Class PoolingAsyncClientConnectionManagerBuilder

- java.lang.Object
- - org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder

-     public class PoolingAsyncClientConnectionManagerBuilder
      extends Object

  Builder for `PoolingAsyncClientConnectionManager` instances.

  When a particular component is not explicitly set this class will use its default implementation. System properties will be taken into account when configuring the default implementations when `useSystemProperties()` method is called prior to calling `build()`.

  - ssl.TrustManagerFactory.algorithm
  - javax.net.ssl.trustStoreType
  - javax.net.ssl.trustStore
  - javax.net.ssl.trustStoreProvider
  - javax.net.ssl.trustStorePassword
  - ssl.KeyManagerFactory.algorithm
  - javax.net.ssl.keyStoreType
  - javax.net.ssl.keyStore
  - javax.net.ssl.keyStoreProvider
  - javax.net.ssl.keyStorePassword
  - https.protocols
  - https.cipherSuites
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PoolingAsyncClientConnectionManagerBuilder()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `PoolingAsyncClientConnectionManager` | `build()`
    `static PoolingAsyncClientConnectionManagerBuilder` | `create()`
    `protected AsyncClientConnectionOperator` | `createConnectionOperator(org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy, SchemePortResolver schemePortResolver, DnsResolver dnsResolver)`
    `PoolingAsyncClientConnectionManagerBuilder` | `setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)` Assigns `Resolver` of `ConnectionConfig` on a per route basis.
    `PoolingAsyncClientConnectionManagerBuilder` | `setConnectionTimeToLive(org.apache.hc.core5.util.TimeValue timeToLive)` Deprecated. Use `setDefaultConnectionConfig(ConnectionConfig)`
    `PoolingAsyncClientConnectionManagerBuilder` | `setConnPoolPolicy(org.apache.hc.core5.pool.PoolReusePolicy poolReusePolicy)` Assigns `PoolReusePolicy` value.
    `PoolingAsyncClientConnectionManagerBuilder` | `setDefaultConnectionConfig(ConnectionConfig config)` Assigns the same `ConnectionConfig` for all routes.
    `PoolingAsyncClientConnectionManagerBuilder` | `setDefaultTlsConfig(TlsConfig config)` Assigns the same `TlsConfig` for all hosts.
    `PoolingAsyncClientConnectionManagerBuilder` | `setDnsResolver(DnsResolver dnsResolver)` Assigns `DnsResolver` instance.
    `PoolingAsyncClientConnectionManagerBuilder` | `setMaxConnPerRoute(int maxConnPerRoute)` Assigns maximum connection per route value.
    `PoolingAsyncClientConnectionManagerBuilder` | `setMaxConnTotal(int maxConnTotal)` Assigns maximum total connection value.
    `PoolingAsyncClientConnectionManagerBuilder` | `setPoolConcurrencyPolicy(org.apache.hc.core5.pool.PoolConcurrencyPolicy poolConcurrencyPolicy)` Assigns `PoolConcurrencyPolicy` value.
    `PoolingAsyncClientConnectionManagerBuilder` | `setSchemePortResolver(SchemePortResolver schemePortResolver)` Assigns `SchemePortResolver` instance.
    `PoolingAsyncClientConnectionManagerBuilder` | `setTlsConfigResolver(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,TlsConfig> tlsConfigResolver)` Assigns `Resolver` of `TlsConfig` on a per host basis.
    `PoolingAsyncClientConnectionManagerBuilder` | `setTlsStrategy(org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy)` Assigns `TlsStrategy` instance for TLS connections.
    `PoolingAsyncClientConnectionManagerBuilder` | `setValidateAfterInactivity(org.apache.hc.core5.util.TimeValue validateAfterInactivity)` Deprecated. Use `setConnectionConfigResolver(Resolver)`.
    `PoolingAsyncClientConnectionManagerBuilder` | `useSystemProperties()` Use system properties when creating and configuring default implementations.

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

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

- - ### Constructor Detail

    - #### PoolingAsyncClientConnectionManagerBuilder

          @Internal
          protected PoolingAsyncClientConnectionManagerBuilder()

  - ### Method Detail

    - #### create

          public static PoolingAsyncClientConnectionManagerBuilder create()

    - #### setTlsStrategy

          public final PoolingAsyncClientConnectionManagerBuilder setTlsStrategy(org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy)

      Assigns `TlsStrategy` instance for TLS connections.

    - #### setDnsResolver

          public final PoolingAsyncClientConnectionManagerBuilder setDnsResolver(DnsResolver dnsResolver)

      Assigns `DnsResolver` instance.

    - #### setSchemePortResolver

          public final PoolingAsyncClientConnectionManagerBuilder setSchemePortResolver(SchemePortResolver schemePortResolver)

      Assigns `SchemePortResolver` instance.

    - #### setPoolConcurrencyPolicy

          public final PoolingAsyncClientConnectionManagerBuilder setPoolConcurrencyPolicy(org.apache.hc.core5.pool.PoolConcurrencyPolicy poolConcurrencyPolicy)

      Assigns `PoolConcurrencyPolicy` value.

    - #### setConnPoolPolicy

          public final PoolingAsyncClientConnectionManagerBuilder setConnPoolPolicy(org.apache.hc.core5.pool.PoolReusePolicy poolReusePolicy)

      Assigns `PoolReusePolicy` value.

    - #### setMaxConnTotal

          public final PoolingAsyncClientConnectionManagerBuilder setMaxConnTotal(int maxConnTotal)

      Assigns maximum total connection value.

    - #### setMaxConnPerRoute

          public final PoolingAsyncClientConnectionManagerBuilder setMaxConnPerRoute(int maxConnPerRoute)

      Assigns maximum connection per route value.

    - #### setDefaultConnectionConfig

          public final PoolingAsyncClientConnectionManagerBuilder setDefaultConnectionConfig(ConnectionConfig config)

      Assigns the same `ConnectionConfig` for all routes.
      Since:
        5.2

    - #### setConnectionConfigResolver

          public final PoolingAsyncClientConnectionManagerBuilder setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)

      Assigns `Resolver` of `ConnectionConfig` on a per route basis.
      Since:
        5.2

    - #### setDefaultTlsConfig

          public final PoolingAsyncClientConnectionManagerBuilder setDefaultTlsConfig(TlsConfig config)

      Assigns the same `TlsConfig` for all hosts.
      Since:
        5.2

    - #### setTlsConfigResolver

          public final PoolingAsyncClientConnectionManagerBuilder setTlsConfigResolver(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,TlsConfig> tlsConfigResolver)

      Assigns `Resolver` of `TlsConfig` on a per host basis.
      Since:
        5.2

    - #### setConnectionTimeToLive

          @Deprecated
          public final PoolingAsyncClientConnectionManagerBuilder setConnectionTimeToLive(org.apache.hc.core5.util.TimeValue timeToLive)

      Deprecated. Use `setDefaultConnectionConfig(ConnectionConfig)`
      Sets maximum time to live for persistent connections

    - #### setValidateAfterInactivity

          @Deprecated
          public final PoolingAsyncClientConnectionManagerBuilder setValidateAfterInactivity(org.apache.hc.core5.util.TimeValue validateAfterInactivity)

      Deprecated. Use `setConnectionConfigResolver(Resolver)`.
      Sets period after inactivity after which persistent connections must be checked to ensure they are still valid.

    - #### useSystemProperties

          public final PoolingAsyncClientConnectionManagerBuilder useSystemProperties()

      Use system properties when creating and configuring default implementations.

    - #### createConnectionOperator

          @Internal
          protected AsyncClientConnectionOperator createConnectionOperator(org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy,
                                                                                     SchemePortResolver schemePortResolver,
                                                                                     DnsResolver dnsResolver)

    - #### build

          public PoolingAsyncClientConnectionManager build()

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