Package org.apache.hc.core5.http.nio
Interface AsyncEntityConsumer<T>
- Type Parameters:
T- entity representation.
- All Superinterfaces:
AsyncDataConsumer,ResourceHolder
- All Known Implementing Classes:
AbstractBinAsyncEntityConsumer,AbstractCharAsyncEntityConsumer,AbstractClassicEntityConsumer,BasicAsyncEntityConsumer,DigestingEntityConsumer,DiscardingEntityConsumer,NoopEntityConsumer,StringAsyncEntityConsumer
Abstract asynchronous message entity consumer.
- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidTriggered to signal a failure in data processing.Returns the result of entity processing when it becomes available ornullif the entity is still being received.voidstreamStart(EntityDetails entityDetails, FutureCallback<T> resultCallback) Signals beginning of an incoming request entity stream.Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer
consume, streamEnd, updateCapacityMethods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder
releaseResources
-
Method Details
-
streamStart
void streamStart(EntityDetails entityDetails, FutureCallback<T> resultCallback) throws HttpException, IOException Signals beginning of an incoming request entity stream.- Parameters:
entityDetails- the details of the incoming message entity.resultCallback- the result callback.- Throws:
HttpExceptionIOException
-
failed
Triggered to signal a failure in data processing.- Parameters:
cause- the cause of the failure.
-
getContent
T getContent()Returns the result of entity processing when it becomes available ornullif the entity is still being received.- Returns:
- the response processing result.
-