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:
java.io.Closeable
,java.lang.AutoCloseable
,HttpAsyncClient
,org.apache.hc.core5.io.ModalCloseable
@Contract(threading=SAFE_CONDITIONAL) public final class MinimalH2AsyncClient extends AbstractMinimalHttpAsyncClientBase
Minimal implementation of HTTP/2 onlyCloseableHttpAsyncClient
. 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
Fields Modifier and Type Field Description private org.apache.hc.core5.reactor.ConnectionInitiator
connectionInitiator
private InternalH2ConnPool
connPool
private static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description MinimalH2AsyncClient(org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, AsyncPushConsumerRegistry pushConsumerRegistry, org.apache.hc.core5.reactor.IOReactorConfig reactorConfig, java.util.concurrent.ThreadFactory threadFactory, java.util.concurrent.ThreadFactory workerThreadFactory, DnsResolver dnsResolver, org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
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 Detail
-
LOG
private static final org.slf4j.Logger LOG
-
connPool
private final InternalH2ConnPool connPool
-
connectionInitiator
private final org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator
-
-
Constructor Detail
-
MinimalH2AsyncClient
MinimalH2AsyncClient(org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, AsyncPushConsumerRegistry pushConsumerRegistry, org.apache.hc.core5.reactor.IOReactorConfig reactorConfig, java.util.concurrent.ThreadFactory threadFactory, java.util.concurrent.ThreadFactory workerThreadFactory, DnsResolver dnsResolver, org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy)
-
-
Method Detail
-
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
-
-