Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.async

public final Class MinimalH2AsyncClient

extends AbstractMinimalHttpAsyncClientBase
Class Inheritance
Annotations
@Contract
threading:SAFE_CONDITIONAL
Imports
java.io.IOException, java.nio.ByteBuffer, java.util.List, java.util.concurrent.CancellationException, .Future, .ThreadFactory, org.apache.hc.client5.http.DnsResolver, org.apache.hc.client5.http.config.Configurable, .ConnectionConfig, .RequestConfig, org.apache.hc.client5.http.impl.ConnPoolSupport, .ExecSupport, org.apache.hc.client5.http.impl.classic.RequestFailedException, org.apache.hc.client5.http.impl.nio.MultihomeConnectionInitiator, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.concurrent.Cancellable, .ComplexCancellable, .FutureCallback, org.apache.hc.core5.function.Resolver, org.apache.hc.core5.http.EntityDetails, .Header, .HttpException, .HttpHost, .HttpResponse, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler, .AsyncPushConsumer, .CapacityChannel, .DataStreamChannel, .HandlerFactory, .RequestChannel, org.apache.hc.core5.http.nio.command.RequestExecutionCommand, .ShutdownCommand, org.apache.hc.core5.http.nio.ssl.TlsStrategy, org.apache.hc.core5.http.protocol.HttpContext, org.apache.hc.core5.io.CloseMode, org.apache.hc.core5.reactor.Command, .ConnectionInitiator, .DefaultConnectingIOReactor, .IOEventHandlerFactory, .IOReactorConfig, .IOSession, org.apache.hc.core5.util.Timeout, org.slf4j.Logger, .LoggerFactory

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

Field Summary

Modifier and TypeField and Description
private final ConnectionInitiator
private final InternalH2ConnPool
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv
MinimalH2AsyncClient(final IOEventHandlerFactory eventHandlerFactory, final AsyncPushConsumerRegistry pushConsumerRegistry, final IOReactorConfig reactorConfig, final ThreadFactory threadFactory, final ThreadFactory workerThreadFactory, final DnsResolver dnsResolver, final TlsStrategy tlsStrategy)

Method Summary

Modifier and TypeMethod and Description
public Cancellable
public void
setConnectionConfigResolver(final Resolver<HttpHost, ConnectionConfig> connectionConfigResolver)

Sets Resolver for ConnectionConfig on a per host basis.

Inherited from org.apache.hc.client5.http.impl.async.AbstractMinimalHttpAsyncClientBase:
doExecuteexecute

Field Detail

connectionInitiatorback to summary
private final ConnectionInitiator connectionInitiator
connPoolback to summary
private final InternalH2ConnPool connPool
LOGback to summary
private static final Logger LOG

Hides org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase.LOG.

Constructor Detail

MinimalH2AsyncClientback to summary
pack-priv MinimalH2AsyncClient(final IOEventHandlerFactory eventHandlerFactory, final AsyncPushConsumerRegistry pushConsumerRegistry, final IOReactorConfig reactorConfig, final ThreadFactory threadFactory, final ThreadFactory workerThreadFactory, final DnsResolver dnsResolver, final TlsStrategy tlsStrategy)

Method Detail

executeback to summary
public Cancellable execute(final AsyncClientExchangeHandler exchangeHandler, final HandlerFactory<AsyncPushConsumer> pushHandlerFactory, final HttpContext context)

Implements abstract org.apache.hc.client5.http.impl.async.AbstractMinimalHttpAsyncClientBase.execute.

Annotations
@Override
setConnectionConfigResolverback to summary
public void setConnectionConfigResolver(final Resolver<HttpHost, ConnectionConfig> connectionConfigResolver)

Sets Resolver for ConnectionConfig on a per host basis.

Since
5.2