org.apache.hc.client5.http.async

## Interface AsyncExecCallback

    public interface AsyncExecCallback

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

Since:
  5.0

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `completed()` Triggered to signal completion of the message exchange.
`void` `failed(Exception cause)` Triggered to signal a failure occurred during the message exchange.
`void` `handleInformationResponse(HttpResponse response)` Triggered to signal receipt of an intermediate response message.
`AsyncDataConsumer` `handleResponse(HttpResponse response, EntityDetails entityDetails)` Triggered to signal receipt of a response message head sent by the server in response to the request being executed.

### Method Detail

#### handleResponse

    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` - the response message head.
  `entityDetails` - the response entity details or `null` if the response does not enclose an entity.
Returns:
  the data consumer to be used for processing of incoming response message body.
Throws:
  `HttpException` - If a protocol error occurs.
  `IOException` - If an I/O error occurs.

#### handleInformationResponse

    void handleInformationResponse(HttpResponse response)
                            throws HttpException,
                                   IOException

Triggered to signal receipt of an intermediate response message.

Parameters:
  `response` - the intermediate response message.
Throws:
  `HttpException` - If a protocol error occurs.
  `IOException` - If an I/O error occurs.

#### completed

    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.

#### failed

    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.