T - entity representation.public abstract class AbstractCharAsyncEntityConsumer<T> extends AbstractCharDataConsumer implements AsyncEntityConsumer<T>
DEF_BUF_SIZE| Modifier | Constructor and Description |
|---|---|
|
AbstractCharAsyncEntityConsumer() |
protected |
AbstractCharAsyncEntityConsumer(int bufSize,
CharCodingConfig charCodingConfig) |
| 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, setCharset, streamEnd, updateCapacityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, streamEnd, updateCapacityreleaseResourcesprotected AbstractCharAsyncEntityConsumer(int bufSize,
CharCodingConfig charCodingConfig)
public AbstractCharAsyncEntityConsumer()
protected 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
AbstractCharDataConsumercompleted in class AbstractCharDataConsumerIOExceptionpublic 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.