Class MinimalH2AsyncClient
java.lang.Object
org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient
org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
org.apache.hc.client5.http.impl.async.AbstractMinimalHttpAsyncClientBase
org.apache.hc.client5.http.impl.async.MinimalH2AsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HttpAsyncClient
,org.apache.hc.core5.io.ModalCloseable
@Contract(threading=SAFE_CONDITIONAL)
public final class MinimalH2AsyncClient
extends AbstractMinimalHttpAsyncClientBase
Minimal implementation of HTTP/2 only
CloseableHttpAsyncClient
. This client
is optimized for HTTP/2 multiplexing message transport and does not support advanced
HTTP protocol functionality such as request execution via a proxy, state management,
authentication and request redirects.
Concurrent message exchanges with the same connection route executed by this client will get automatically multiplexed over a single physical HTTP/2 connection.
- Since:
- 5.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
AbstractHttpAsyncClientBase.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hc.core5.reactor.ConnectionInitiator
private final InternalH2ConnPool
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorsConstructorDescriptionMinimalH2AsyncClient
(org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, AsyncPushConsumerRegistry pushConsumerRegistry, org.apache.hc.core5.reactor.IOReactorConfig reactorConfig, ThreadFactory threadFactory, ThreadFactory workerThreadFactory, DnsResolver dnsResolver, org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.core5.concurrent.Cancellable
execute
(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context) void
setConnectionConfigResolver
(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost, ConnectionConfig> connectionConfigResolver) SetsResolver
forConnectionConfig
on a per host basis.Methods inherited from class org.apache.hc.client5.http.impl.async.AbstractMinimalHttpAsyncClientBase
doExecute, execute
Methods inherited from class org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase
awaitShutdown, close, close, getConnectionInitiator, getStatus, initiateShutdown, internalClose, isRunning, register, start
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
connPool
-
connectionInitiator
private final org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator
-
-
Constructor Details
-
MinimalH2AsyncClient
MinimalH2AsyncClient(org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, AsyncPushConsumerRegistry pushConsumerRegistry, org.apache.hc.core5.reactor.IOReactorConfig reactorConfig, ThreadFactory threadFactory, ThreadFactory workerThreadFactory, DnsResolver dnsResolver, org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy)
-
-
Method Details
-
execute
public org.apache.hc.core5.concurrent.Cancellable execute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context) - Specified by:
execute
in classAbstractMinimalHttpAsyncClientBase
-
setConnectionConfigResolver
public void setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost, ConnectionConfig> connectionConfigResolver) SetsResolver
forConnectionConfig
on a per host basis.- Since:
- 5.2
-