Package org.apache.hc.core5.http.nio
Interface AsyncClientExchangeHandler
- All Superinterfaces:
AsyncDataConsumer,AsyncDataExchangeHandler,AsyncDataProducer,ResourceHolder
- All Known Implementing Classes:
BasicClientExchangeHandler
Abstract asynchronous client side message exchange handler that acts as a request producer
and a response consumer.
- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Triggered to cancel the message exchange.voidconsumeInformation(HttpResponse response, HttpContext context) Triggered to signal receipt of an intermediate (1xx) HTTP response.voidconsumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context) Triggered to signal receipt of a response message head.voidproduceRequest(RequestChannel channel, HttpContext context) Triggered to signal the ability of the underlying request channel to accept a request messages.Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer
consume, streamEnd, updateCapacityMethods inherited from interface org.apache.hc.core5.http.nio.AsyncDataExchangeHandler
failedMethods inherited from interface org.apache.hc.core5.http.nio.AsyncDataProducer
available, produceMethods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder
releaseResources
-
Method Details
-
produceRequest
Triggered to signal the ability of the underlying request channel to accept a request messages. The data producer can choose to send a request message immediately inside the call or asynchronously at some later point.- Parameters:
channel- the request channel capable to accepting a request message.context- the actual execution context.- Throws:
HttpExceptionIOException
-
consumeResponse
void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context) throws HttpException, IOException Triggered to signal receipt of a response message head.- Parameters:
response- the response message head.entityDetails- the response entity details ornullif the response does not enclose an entity.context- the actual execution context.- Throws:
HttpExceptionIOException
-
consumeInformation
void consumeInformation(HttpResponse response, HttpContext context) throws HttpException, IOException Triggered to signal receipt of an intermediate (1xx) HTTP response.- Parameters:
response- the intermediate (1xx) HTTP response.context- the actual execution context.- Throws:
HttpExceptionIOException
-
cancel
void cancel()Triggered to cancel the message exchange.
-