Class MinimalHttpAsyncClient

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, HttpAsyncClient, org.apache.hc.core5.io.ModalCloseable

    @Contract(threading=SAFE_CONDITIONAL)
    public final class MinimalHttpAsyncClient
    extends AbstractMinimalHttpAsyncClientBase
    Minimal implementation of CloseableHttpAsyncClient. This client is optimized for HTTP/1.1 and HTTP/2 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 executed by this client will get assigned to separate connections leased from the connection pool.

    Since:
    5.0
    • Constructor Detail

      • MinimalHttpAsyncClient

        MinimalHttpAsyncClient​(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,
                               AsyncClientConnectionManager manager,
                               SchemePortResolver schemePortResolver,
                               TlsConfig tlsConfig)
    • Method Detail

      • leaseEndpoint

        private java.util.concurrent.Future<AsyncConnectionEndpoint> leaseEndpoint​(org.apache.hc.core5.http.HttpHost host,
                                                                                   org.apache.hc.core5.util.Timeout connectionRequestTimeout,
                                                                                   org.apache.hc.core5.util.Timeout connectTimeout,
                                                                                   HttpClientContext clientContext,
                                                                                   org.apache.hc.core5.concurrent.FutureCallback<AsyncConnectionEndpoint> callback)
      • lease

        public java.util.concurrent.Future<org.apache.hc.core5.http.nio.AsyncClientEndpoint> lease​(org.apache.hc.core5.http.HttpHost host,
                                                                                                   org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.nio.AsyncClientEndpoint> callback)
      • lease

        public java.util.concurrent.Future<org.apache.hc.core5.http.nio.AsyncClientEndpoint> lease​(org.apache.hc.core5.http.HttpHost host,
                                                                                                   org.apache.hc.core5.http.protocol.HttpContext context,
                                                                                                   org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.nio.AsyncClientEndpoint> callback)
      • 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