Interface HttpAsyncClient

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> java.util.concurrent.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.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, 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.
    • Method Detail

      • execute

        <T> java.util.concurrent.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.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory,
                                                   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.

        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.
        pushHandlerFactory - the push handler factory. Optional and may be null.
        context - HTTP context. Optional and may be null.
        callback - future callback. Optional and may be null.
        Returns:
        future representing pending completion of the operation.