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

public Interface AsyncExecCallback

Imports
java.io.IOException, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpResponse, org.apache.hc.core5.http.nio.AsyncDataConsumer

AsyncExecCallback methods represent response processing events in the client side request execution chain.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
completed()

Triggered to signal completion of the message exchange.

public void
failed(Exception cause)

Triggered to signal a failure occurred during the message exchange.

public void
handleInformationResponse(HttpResponse
the intermediate response message.
response
)

Triggered to signal receipt of an intermediate response message.

public AsyncDataConsumer

Returns:

the data consumer to be used for processing of incoming response message body.
handleResponse
(HttpResponse
the response message head.
response
,
EntityDetails
the response entity details or null if the response does not enclose an entity.
entityDetails
)

Triggered to signal receipt of a response message head sent by the server in response to the request being executed.

Method Detail

completedback to summary
public void completed()

Triggered to signal completion of the message exchange.

Implementations of this message are expected to perform resource deallocation allocated in the course of the request execution and response processing.

failedback to summary
public void failed(Exception cause)

Triggered to signal a failure occurred during the message exchange.

Implementations of this message are expected to perform resource deallocation allocated in the course of the request execution and response processing.

handleInformationResponseback to summary
public void handleInformationResponse(HttpResponse response) throws HttpException, IOException

Triggered to signal receipt of an intermediate response message.

Parameters
response:HttpResponse

the intermediate response message.

handleResponseback to summary
public AsyncDataConsumer handleResponse(HttpResponse response, EntityDetails entityDetails) throws HttpException, IOException

Triggered to signal receipt of a response message head sent by the server in response to the request being executed.

Parameters
response:HttpResponse

the response message head.

entityDetails:EntityDetails

the response entity details or null if the response does not enclose an entity.

Returns:AsyncDataConsumer

the data consumer to be used for processing of incoming response message body.