Class BasicClientExchangeHandler<T>
java.lang.Object
org.apache.hc.core5.http.nio.support.AbstractClientExchangeHandler<T>
org.apache.hc.core5.http.nio.support.BasicClientExchangeHandler<T>
- Type Parameters:
T- The result type.
- All Implemented Interfaces:
AsyncClientExchangeHandler, AsyncDataConsumer, AsyncDataExchangeHandler, AsyncDataProducer, ResourceHolder
Basic
AsyncClientExchangeHandler implementation that makes use
of AsyncRequestProducer to generate request message
and AsyncResponseConsumer to process the response message returned by the server.- Since:
- 5.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBasicClientExchangeHandler(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> resultCallback) -
Method Summary
Modifier and TypeMethodDescriptionprotected AsyncResponseConsumer<T> supplyConsumer(HttpResponse response, EntityDetails entityDetails, HttpContext context) Triggered to supply a response consumer to process the incoming response.Methods inherited from class AbstractClientExchangeHandler
available, cancel, consume, consumeInformation, consumeResponse, failed, produce, produceRequest, releaseResources, streamEnd, updateCapacityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AsyncDataExchangeHandler
outputAborted
-
Field Details
-
responseConsumer
-
-
Constructor Details
-
BasicClientExchangeHandler
public BasicClientExchangeHandler(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> resultCallback)
-
-
Method Details
-
supplyConsumer
protected AsyncResponseConsumer<T> supplyConsumer(HttpResponse response, EntityDetails entityDetails, HttpContext context) throws HttpException Description copied from class:AbstractClientExchangeHandlerTriggered to supply a response consumer to process the incoming response.- Specified by:
supplyConsumerin classAbstractClientExchangeHandler<T>- Parameters:
response- the response message.entityDetails- the request entity details.context- the actual execution context.- Returns:
- the request consumer.
- Throws:
HttpException- in case of an HTTP protocol violation.
-