CloseableHttpAsyncClient instances that can negotiate
the most optimal HTTP protocol version during the TLS handshake
with ALPN extension if supported by the Java runtime.
Concurrent message exchanges executed by CloseableHttpAsyncClient
instances created with this builder will get automatically assigned to
separate connections leased from the connection pool.
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().
Please note that some settings used by this class can be mutually
exclusive and may not apply when building CloseableHttpAsyncClient
instances.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addCloseable(final Closeable closeable)
Adds to the list of |
| public final HttpAsyncClientBuilder | addExecInterceptorAfter(final String existing, final String name, final AsyncExecChainHandler interceptor)
Adds this execution interceptor after interceptor with the given name. |
| public final HttpAsyncClientBuilder | addExecInterceptorBefore(final String existing, final String name, final AsyncExecChainHandler interceptor)
Adds this execution interceptor before an existing interceptor. |
| public final HttpAsyncClientBuilder | addExecInterceptorFirst(final String name, final AsyncExecChainHandler interceptor)
Add an interceptor to the head of the processing list. |
| public final HttpAsyncClientBuilder | addExecInterceptorLast(final String name, final AsyncExecChainHandler interceptor)
Add an interceptor to the tail of the processing list. |
| public final HttpAsyncClientBuilder | addRequestInterceptorFirst(final HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the head of the protocol processing list. |
| public final HttpAsyncClientBuilder | addRequestInterceptorLast(final HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the tail of the protocol processing list. |
| public final HttpAsyncClientBuilder | addResponseInterceptorFirst(final HttpResponseInterceptor interceptor)
Adds this protocol interceptor to the head of the protocol processing list. |
| public final HttpAsyncClientBuilder | addResponseInterceptorLast(final HttpResponseInterceptor interceptor)
Adds this protocol interceptor to the tail of the protocol processing list. |
| public CloseableHttpAsyncClient | |
| public static HttpAsyncClientBuilder | |
| protected void | customizeExecChain(final NamedElementChain<AsyncExecChainHandler> execChainDefinition)
Request exec chain customization and extension. |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | evictExpiredConnections()
Makes this instance of HttpClient proactively evict expired connections from the connection pool using a background thread. |
| public final HttpAsyncClientBuilder | evictIdleConnections(final TimeValue
maximum time persistent connections can stay idle while kept alive
in the connection pool. Connections whose inactivity period exceeds this value will
get closed and evicted from the pool. maxIdleTime)Makes this instance of HttpClient proactively evict idle connections from the connection pool using a background thread. |
| private String | |
| public final HttpAsyncClientBuilder | replaceExecInterceptor(final String existing, final AsyncExecChainHandler interceptor)
Replace an existing interceptor with the given name with new interceptor. |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | setConnectionManager(final AsyncClientConnectionManager connManager)
Assigns |
| public final HttpAsyncClientBuilder | setConnectionManagerShared(final boolean
defines whether or not the connection manager can be shared
by multiple clients. shared)Defines the connection manager is to be shared by multiple client instances. |
| public final HttpAsyncClientBuilder | setConnectionReuseStrategy(final ConnectionReuseStrategy reuseStrategy)
Assigns |
| public final HttpAsyncClientBuilder | setDefaultAuthSchemeRegistry(final Lookup<AuthSchemeFactory> authSchemeRegistry)
Assigns default |
| public final HttpAsyncClientBuilder | setDefaultCookieSpecRegistry(final Lookup<CookieSpecFactory> cookieSpecRegistry)
Assigns default |
| public final HttpAsyncClientBuilder | setDefaultCookieStore(final CookieStore cookieStore)
Assigns default |
| public final HttpAsyncClientBuilder | setDefaultCredentialsProvider(final CredentialsProvider credentialsProvider)
Assigns default |
| public final HttpAsyncClientBuilder | setDefaultHeaders(final Collection<? extends Header> defaultHeaders)
Assigns default request header values. |
| public final HttpAsyncClientBuilder | setDefaultRequestConfig(final RequestConfig config)
Assigns default |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | setIoReactorExceptionCallback(final Callback<Exception> ioReactorExceptionCallback)
Sets the callback that will be invoked when the client's IOReactor encounters an uncaught exception. |
| public final HttpAsyncClientBuilder | setIoSessionDecorator(final Decorator<IOSession> ioSessionDecorator)
Sets the |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | setKeepAliveStrategy(final ConnectionKeepAliveStrategy keepAliveStrategy)
Assigns |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | setProxyAuthenticationStrategy(final AuthenticationStrategy proxyAuthStrategy)
Assigns |
| public final HttpAsyncClientBuilder | Returns: thisHttpAsyncClientBuilder instance, to allow for method chaining.the proxySelector)java. to be used, or null to use
the default system proxy selector.Sets the |
| public HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | setRetryStrategy(final HttpRequestRetryStrategy retryStrategy)
Assigns |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | setSchemePortResolver(final SchemePortResolver schemePortResolver)
Assigns |
| public final HttpAsyncClientBuilder | setTargetAuthenticationStrategy(final AuthenticationStrategy targetAuthStrategy)
Assigns |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | |
| public final HttpAsyncClientBuilder | setVersionPolicy(final HttpVersionPolicy versionPolicy)
Deprecated
Use
Sets HTTP protocol version policy.
TlsConfig and connection manager methods
|
| public final HttpAsyncClientBuilder |