Class AbstractBinResponseConsumer<T>
java.lang.Object
org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
org.apache.hc.client5.http.async.methods.AbstractBinResponseConsumer<T>
- Type Parameters:
T- response message representation.
- All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T>, org.apache.hc.core5.http.nio.ResourceHolder
public abstract class AbstractBinResponseConsumer<T>
extends org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
implements org.apache.hc.core5.http.nio.AsyncResponseConsumer<T>
Abstract response consumer that processes response body data as an octet stream.
- Since:
- 5.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TTriggered to generate object that represents a result of response message processing.protected final voidfinal voidconsumeResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> resultCallback) voidvoidinformationResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context) protected abstract voidstart(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.ContentType contentType) Triggered to signal the beginning of response processing.Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
capacityIncrement, consume, data, streamEnd, updateCapacityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer
consume, streamEnd, updateCapacityMethods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder
releaseResources
-
Field Details
-
resultCallback
-
-
Constructor Details
-
AbstractBinResponseConsumer
public AbstractBinResponseConsumer()
-
-
Method Details
-
start
protected abstract void start(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.ContentType contentType) throws org.apache.hc.core5.http.HttpException, IOException Triggered to signal the beginning of response processing.- Parameters:
response- the response message headcontentType- the content type of the response body, ornullif the response does not enclose a response entity.- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
buildResult
Triggered to generate object that represents a result of response message processing.- Returns:
- the result of response processing.
-
informationResponse
public void informationResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException - Specified by:
informationResponsein interfaceorg.apache.hc.core5.http.nio.AsyncResponseConsumer<T>- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
consumeResponse
public final void consumeResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> resultCallback) throws org.apache.hc.core5.http.HttpException, IOException - Specified by:
consumeResponsein interfaceorg.apache.hc.core5.http.nio.AsyncResponseConsumer<T>- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
completed
protected final void completed()- Specified by:
completedin classorg.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
-
failed
-