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
public final class BasicClientExchangeHandler<T> extends AbstractClientExchangeHandler<T>
BasicAsyncClientExchangeHandlerimplementation that makes use ofAsyncRequestProducerto generate request message andAsyncResponseConsumerto process the response message returned by the server.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description BasicClientExchangeHandler(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> resultCallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AsyncResponseConsumer<T>supplyConsumer(HttpResponse response, EntityDetails entityDetails, HttpContext context)Triggered to supply a response consumer to process the incoming response.-
Methods inherited from class org.apache.hc.core5.http.nio.support.AbstractClientExchangeHandler
available, cancel, consume, consumeInformation, consumeResponse, failed, produce, produceRequest, releaseResources, streamEnd, updateCapacity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataExchangeHandler
outputAborted
-
-
-
-
Constructor Detail
-
BasicClientExchangeHandler
public BasicClientExchangeHandler(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> resultCallback)
-
-
Method Detail
-
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.
-
-