T - entity representation.public abstract class AbstractBinAsyncEntityConsumer<T> extends AbstractBinDataConsumer implements AsyncEntityConsumer<T>
| Constructor and Description |
|---|
AbstractBinAsyncEntityConsumer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
completed()
Triggered to signal completion of data processing.
|
void |
failed(Exception cause)
Triggered to signal a failure in data processing.
|
protected abstract T |
generateContent()
Triggered to generate entity representation.
|
T |
getContent()
Returns the result of entity processing when it becomes available or
null
if the entity is still being received. |
protected abstract void |
streamStart(ContentType contentType)
Triggered to signal beginning of entity content stream.
|
void |
streamStart(EntityDetails entityDetails,
FutureCallback<T> resultCallback)
Signals beginning of an incoming request entity stream.
|
capacityIncrement, consume, data, streamEnd, updateCapacityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, streamEnd, updateCapacityreleaseResourcesprotected abstract void streamStart(ContentType contentType) throws HttpException, IOException
contentType - the entity content typeHttpExceptionIOExceptionprotected abstract T generateContent() throws IOException
IOExceptionpublic final void streamStart(EntityDetails entityDetails, FutureCallback<T> resultCallback) throws IOException, HttpException
AsyncEntityConsumerstreamStart in interface AsyncEntityConsumer<T>entityDetails - the details of the incoming message entity.resultCallback - the result callback.IOExceptionHttpExceptionprotected final void completed()
throws IOException
AbstractBinDataConsumercompleted in class AbstractBinDataConsumerIOExceptionpublic final void failed(Exception cause)
AsyncEntityConsumerfailed in interface AsyncEntityConsumer<T>cause - the cause of the failure.public final T getContent()
AsyncEntityConsumernull
if the entity is still being received.getContent in interface AsyncEntityConsumer<T>Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.