Package org.apache.hc.client5.http.async
Interface AsyncExecCallback
- All Known Implementing Classes:
AsyncCachingExec.AsyncExecCallbackWrapper
,AsyncCachingExec.BackendResponseHandler
public interface AsyncExecCallback
AsyncExecCallback methods represent response processing events
in the client side request execution chain.
- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Triggered to signal completion of the message exchange.void
Triggered to signal a failure occurred during the message exchange.void
handleInformationResponse
(org.apache.hc.core5.http.HttpResponse response) Triggered to signal receipt of an intermediate response message.org.apache.hc.core5.http.nio.AsyncDataConsumer
handleResponse
(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails) Triggered to signal receipt of a response message head sent by the server in response to the request being executed.
-
Method Details
-
handleResponse
org.apache.hc.core5.http.nio.AsyncDataConsumer handleResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails) throws org.apache.hc.core5.http.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 ornull
if the response does not enclose an entity.- Returns:
- the data consumer to be used for processing of incoming response message body.
- Throws:
org.apache.hc.core5.http.HttpException
IOException
-
handleInformationResponse
void handleInformationResponse(org.apache.hc.core5.http.HttpResponse response) throws org.apache.hc.core5.http.HttpException, IOException Triggered to signal receipt of an intermediate response message.- Parameters:
response
- the intermediate response message.- Throws:
org.apache.hc.core5.http.HttpException
IOException
-
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
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.
-