public class PoolingHttpClientConnectionManagerBuilder extends Object
PoolingHttpClientConnectionManager
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()
.
public static PoolingHttpClientConnectionManagerBuilder create()
public final PoolingHttpClientConnectionManagerBuilder setConnectionFactory(org.apache.hc.core5.http.io.HttpConnectionFactory<ManagedHttpClientConnection> connectionFactory)
HttpConnectionFactory
instance.@Deprecated public final PoolingHttpClientConnectionManagerBuilder setSSLSocketFactory(LayeredConnectionSocketFactory sslSocketFactory)
setTlsSocketStrategy(TlsSocketStrategy)
LayeredConnectionSocketFactory
instance.public final PoolingHttpClientConnectionManagerBuilder setTlsSocketStrategy(TlsSocketStrategy tlsSocketStrategy)
TlsSocketStrategy
instance.public final PoolingHttpClientConnectionManagerBuilder setDnsResolver(DnsResolver dnsResolver)
DnsResolver
instance.public final PoolingHttpClientConnectionManagerBuilder setSchemePortResolver(SchemePortResolver schemePortResolver)
SchemePortResolver
instance.public final PoolingHttpClientConnectionManagerBuilder setPoolConcurrencyPolicy(org.apache.hc.core5.pool.PoolConcurrencyPolicy poolConcurrencyPolicy)
PoolConcurrencyPolicy
value.public final PoolingHttpClientConnectionManagerBuilder setConnPoolPolicy(org.apache.hc.core5.pool.PoolReusePolicy poolReusePolicy)
PoolReusePolicy
value.public final PoolingHttpClientConnectionManagerBuilder setMaxConnTotal(int maxConnTotal)
public final PoolingHttpClientConnectionManagerBuilder setMaxConnPerRoute(int maxConnPerRoute)
public final PoolingHttpClientConnectionManagerBuilder setDefaultSocketConfig(org.apache.hc.core5.http.io.SocketConfig config)
SocketConfig
for all routes.public final PoolingHttpClientConnectionManagerBuilder setSocketConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,org.apache.hc.core5.http.io.SocketConfig> socketConfigResolver)
Resolver
of SocketConfig
on a per route basis.public final PoolingHttpClientConnectionManagerBuilder setDefaultConnectionConfig(ConnectionConfig config)
ConnectionConfig
for all routes.public final PoolingHttpClientConnectionManagerBuilder setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Resolver
of ConnectionConfig
on a per route basis.public final PoolingHttpClientConnectionManagerBuilder setDefaultTlsConfig(TlsConfig config)
TlsConfig
for all hosts.public final PoolingHttpClientConnectionManagerBuilder setTlsConfigResolver(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,TlsConfig> tlsConfigResolver)
Resolver
of TlsConfig
on a per host basis.@Deprecated public final PoolingHttpClientConnectionManagerBuilder setConnectionTimeToLive(org.apache.hc.core5.util.TimeValue timeToLive)
setDefaultConnectionConfig(ConnectionConfig)
.@Deprecated public final PoolingHttpClientConnectionManagerBuilder setValidateAfterInactivity(org.apache.hc.core5.util.TimeValue validateAfterInactivity)
setDefaultConnectionConfig(ConnectionConfig)
.public final PoolingHttpClientConnectionManagerBuilder useSystemProperties()
public PoolingHttpClientConnectionManager build()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.