T - response message representation.public abstract class AbstractCharResponseConsumer<T> extends AbstractCharDataConsumer implements AsyncResponseConsumer<T>
DEF_BUF_SIZE| Modifier | Constructor and Description |
|---|---|
|
AbstractCharResponseConsumer() |
protected |
AbstractCharResponseConsumer(int bufSize,
CharCodingConfig charCodingConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
buildResult()
Triggered to generate object that represents a result of response message processing.
|
protected void |
completed() |
void |
consumeResponse(HttpResponse response,
EntityDetails entityDetails,
HttpContext context,
FutureCallback<T> resultCallback) |
void |
failed(Exception cause) |
void |
informationResponse(HttpResponse response,
HttpContext context) |
protected abstract void |
start(HttpResponse response,
ContentType contentType)
Triggered to signal the beginning of data processing.
|
capacityIncrement, consume, data, setCharset, streamEnd, updateCapacityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, streamEnd, updateCapacityreleaseResourcespublic AbstractCharResponseConsumer()
protected AbstractCharResponseConsumer(int bufSize,
CharCodingConfig charCodingConfig)
protected abstract void start(HttpResponse response, ContentType contentType) throws HttpException, IOException
response - the response message headcontentType - the content type of the response body,
or null if the response does not enclose a response entity.HttpExceptionIOExceptionprotected abstract T buildResult() throws IOException
IOExceptionpublic void informationResponse(HttpResponse response, HttpContext context) throws HttpException, IOException
informationResponse in interface AsyncResponseConsumer<T>HttpExceptionIOExceptionpublic final void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context, FutureCallback<T> resultCallback) throws HttpException, IOException
consumeResponse in interface AsyncResponseConsumer<T>HttpExceptionIOExceptionprotected final void completed()
throws IOException
completed in class AbstractCharDataConsumerIOExceptionpublic void failed(Exception cause)
failed in interface AsyncResponseConsumer<T>Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.