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
public interface AsyncEntityConsumer<T> extends AsyncDataConsumer
Abstract asynchronous message entity consumer.- Since:
- 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
failed(java.lang.Exception cause)
Triggered to signal a failure in data processing.T
getContent()
Returns the result of entity processing when it becomes available ornull
if the entity is still being received.void
streamStart(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, updateCapacity
-
Methods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder
releaseResources
-
-
-
-
Method Detail
-
streamStart
void streamStart(EntityDetails entityDetails, FutureCallback<T> resultCallback) throws HttpException, java.io.IOException
Signals beginning of an incoming request entity stream.- Parameters:
entityDetails
- the details of the incoming message entity.resultCallback
- the result callback.- Throws:
HttpException
java.io.IOException
-
failed
void failed(java.lang.Exception cause)
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 ornull
if the entity is still being received.- Returns:
- the response processing result.
-
-