Class 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
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • connPool

      private final InternalH2ConnPool 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 class AbstractMinimalHttpAsyncClientBase
    • setConnectionConfigResolver

      public void setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,ConnectionConfig> connectionConfigResolver)
      Sets Resolver for ConnectionConfig on a per host basis.
      Since:
      5.2