Top Description Methods
org.apache.hc.client5.http.async

public Interface AsyncExecChainHandler

Known Direct Implementers
org.apache.hc.client5.http.impl.async.AsyncConnectExec, org.apache.hc.client5.http.impl.async.AsyncHttpRequestRetryExec, org.apache.hc.client5.http.impl.async.AsyncProtocolExec, org.apache.hc.client5.http.impl.async.AsyncRedirectExec, org.apache.hc.client5.http.impl.async.H2AsyncMainClientExec, org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec
Annotations
@Contract
threading:STATELESS
Imports
java.io.IOException, org.apache.hc.client5.http.impl.ChainElement, org.apache.hc.client5.http.impl.async.AsyncHttpRequestRetryExec, .HttpAsyncClientBuilder, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.HttpException, .HttpRequest, org.apache.hc.core5.http.nio.AsyncEntityProducer

Abstract request execution handler in an asynchronous client side request execution chain. Handlers can either be a decorator around another element that implements a cross cutting aspect or a self-contained executor capable of producing a response for the given request.

For information regarding the handler chain behaviour in case of a request re-execution, please refer to the AsyncHttpRequestRetryExec javadoc.

Well known request execution handlers could be referred to by name using one of the ChainElement enum values.

Since
5.0
See Also
ChainElement, HttpAsyncClientBuilder#addExecInterceptorFirst(String, AsyncExecChainHandler), HttpAsyncClientBuilder#addExecInterceptorBefore(String, String, AsyncExecChainHandler), HttpAsyncClientBuilder#addExecInterceptorAfter(String, String, AsyncExecChainHandler), HttpAsyncClientBuilder#addExecInterceptorLast(String, AsyncExecChainHandler)

Method Summary

Modifier and TypeMethod and Description
public void
execute(HttpRequest
the actual request.
request
,
AsyncEntityProducer
the request entity producer or null if the request does not enclose an entity.
entityProducer
,
AsyncExecChain.Scope
the execution scope .
scope
,
AsyncExecChain
the next element in the request execution chain.
chain
,
AsyncExecCallback
the execution callback.
asyncExecCallback
)

Executes the actual HTTP request.

Method Detail

executeback to summary
public void execute(HttpRequest request, AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback asyncExecCallback) throws HttpException, IOException

Executes the actual HTTP request. The handler can choose to return a response message immediately inside the call or asynchronously at some later point or delegate request execution to the next element in the execution chain.

Parameters
request:HttpRequest

the actual request.

entityProducer:AsyncEntityProducer

the request entity producer or null if the request does not enclose an entity.

scope:AsyncExecChain.Scope

the execution scope .

chain:AsyncExecChain

the next element in the request execution chain.

asyncExecCallback:AsyncExecCallback

the execution callback.