org.apache.hc.client5.http.impl.async

## Class MinimalHttp2AsyncClient

- java.lang.Object
- - org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient
  - - org.apache.hc.client5.http.impl.async.MinimalHttp2AsyncClient

All Implemented Interfaces:
  Closeable, AutoCloseable, HttpAsyncClient

    public final class MinimalHttp2AsyncClient
    extends CloseableHttpAsyncClient

### Method Summary

Methods
`void` `awaitShutdown(org.apache.hc.core5.util.TimeValue waitTime)`
`void` `close()`
`<T> Future<T>` `execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)` Initiates asynchronous HTTP request execution using the given context.
`<T extends org.apache.hc.core5.http.nio.AsyncClientExchangeHandler> Future<T>` `execute(T exchangeHandler, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)`
`List<org.apache.hc.core5.reactor.ExceptionEvent>` `getExceptionLog()`
`org.apache.hc.core5.reactor.IOReactorStatus` `getStatus()`
`void` `initiateShutdown()`
`void` `register(String hostname, String uriPattern, org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)` Registers `AsyncPushConsumer` for the given host and the URI pattern.
`void` `shutdown(org.apache.hc.core5.io.ShutdownType shutdownType)`
`void` `start()`

### Methods inherited from class org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient

`execute, execute, execute, register`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### execute

    public final <T> Future<T> execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer,
                        org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer,
                        org.apache.hc.core5.http.protocol.HttpContext context,
                        org.apache.hc.core5.concurrent.FutureCallback<T> callback)

Description copied from interface: `HttpAsyncClient`
Initiates asynchronous HTTP request execution using the given context.

The request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.

Please note it may be unsafe to interact with the context instance while the request is still being executed.

Type Parameters:
  `T` - the result type of request execution.
Parameters:
  `requestProducer` - request producer callback.
  `responseConsumer` - response consumer callback.
  `context` - HTTP context
  `callback` - future callback.
Returns:
  future representing pending completion of the operation.

#### execute

    public final <T extends org.apache.hc.core5.http.nio.AsyncClientExchangeHandler> Future<T> execute(T exchangeHandler,
                                                                                        org.apache.hc.core5.http.protocol.HttpContext context,
                                                                                        org.apache.hc.core5.concurrent.FutureCallback<T> callback)

#### start

    public final void start()

Specified by:
  `start` in class `CloseableHttpAsyncClient`

#### register

    public void register(String hostname,
                String uriPattern,
                org.apache.hc.core5.function.Supplier<org.apache.hc.core5.http.nio.AsyncPushConsumer> supplier)

Description copied from interface: `HttpAsyncClient`
Registers `AsyncPushConsumer` for the given host and the URI pattern.

Parameters:
  `hostname` - the name of the host this consumer intended for. Can be `null` if applies to all hosts
  `uriPattern` - URI request pattern
  `supplier` - supplier that will be used to supply a consumer instance for the given combination of hostname and URI pattern.

#### getStatus

    public final org.apache.hc.core5.reactor.IOReactorStatus getStatus()

Specified by:
  `getStatus` in class `CloseableHttpAsyncClient`

#### getExceptionLog

    public final List<org.apache.hc.core5.reactor.ExceptionEvent> getExceptionLog()

Specified by:
  `getExceptionLog` in class `CloseableHttpAsyncClient`

#### awaitShutdown

    public final void awaitShutdown(org.apache.hc.core5.util.TimeValue waitTime)
                             throws InterruptedException

Specified by:
  `awaitShutdown` in class `CloseableHttpAsyncClient`
Throws:
  `InterruptedException`

#### initiateShutdown

    public final void initiateShutdown()

Specified by:
  `initiateShutdown` in class `CloseableHttpAsyncClient`

#### shutdown

    public final void shutdown(org.apache.hc.core5.io.ShutdownType shutdownType)

Specified by:
  `shutdown` in class `CloseableHttpAsyncClient`

#### close

    public void close()