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

## Class InternalH2AsyncClient

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

- All Implemented Interfaces:
    Closeable, AutoCloseable, HttpAsyncClient, ModalCloseable

      @Contract(threading=SAFE_CONDITIONAL)
       @Internal
      public final class InternalH2AsyncClient
      extends CloseableHttpAsyncClient

  Internal implementation of HTTP/2 only `CloseableHttpAsyncClient`.

  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

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `awaitShutdown(TimeValue waitTime)`
    `void` | `close()`
    `void` | `close(CloseMode closeMode)`
    `protected <T> Future<T>` | `doExecute(HttpHost httpHost, AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context, FutureCallback<T> callback)`
    `IOReactorStatus` | `getStatus()`
    `void` | `initiateShutdown()`
    `void` | `register(String hostname, String uriPattern, Supplier<AsyncPushConsumer> supplier)`
    `void` | `start()`

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

      `execute, execute, execute, execute, execute, execute, register`

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

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

- - ### Method Detail

    - #### doExecute

          protected <T> Future<T> doExecute(HttpHost httpHost,
                                            AsyncRequestProducer requestProducer,
                                            AsyncResponseConsumer<T> responseConsumer,
                                            HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
                                            HttpContext context,
                                            FutureCallback<T> callback)

      Specified by:
        `doExecute` in class `CloseableHttpAsyncClient`

    - #### start

          public final void start()

      Specified by:
        `start` in class `CloseableHttpAsyncClient`

    - #### register

          public void register(String hostname,
                               String uriPattern,
                               Supplier<AsyncPushConsumer> supplier)

      Specified by:
        `register` in class `CloseableHttpAsyncClient`

    - #### getStatus

          public final IOReactorStatus getStatus()

      Specified by:
        `getStatus` in class `CloseableHttpAsyncClient`

    - #### awaitShutdown

          public final void awaitShutdown(TimeValue waitTime)
                                   throws InterruptedException

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

    - #### initiateShutdown

          public final void initiateShutdown()

      Specified by:
        `initiateShutdown` in class `CloseableHttpAsyncClient`

    - #### close

          public final void close(CloseMode closeMode)

    - #### close

          public void close()

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.