T - response message representation.public abstract class AbstractCharResponseConsumer<T> extends AbstractCharDataConsumer implements AsyncResponseConsumer<T>
DEF_BUF_SIZE| Constructor and Description |
|---|
AbstractCharResponseConsumer() |
| 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()
Triggered to signal completion of data processing.
|
void |
consumeResponse(HttpResponse response,
EntityDetails entityDetails,
HttpContext context,
FutureCallback<T> resultCallback)
Triggered to signal receipt of a response message head.
|
void |
failed(Exception cause)
Triggered to signal a failure in data processing.
|
void |
informationResponse(HttpResponse response,
HttpContext context)
Triggered to signal receipt of an intermediate (1xx) HTTP response.
|
protected abstract void |
start(HttpResponse response,
ContentType contentType)
Triggered to signal the beginning of data processing.
|
capacityIncrement, consume, data, setCharset, streamEnd, updateCapacityclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, streamEnd, updateCapacityreleaseResourcesprotected abstract T buildResult() throws IOException
IOExceptionprotected final void completed()
throws IOException
AbstractCharDataConsumercompleted in class AbstractCharDataConsumerIOExceptionpublic final void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context, FutureCallback<T> resultCallback) throws HttpException, IOException
AsyncResponseConsumerconsumeResponse in interface AsyncResponseConsumer<T>response - the response message head.entityDetails - the response entity details or null if the response
does not enclose an entity.context - the actual execution context.resultCallback - the result callback called when response processing
has been completed successfully or unsuccessfully.HttpExceptionIOExceptionpublic void failed(Exception cause)
AsyncResponseConsumerfailed in interface AsyncResponseConsumer<T>cause - the cause of the failure.public void informationResponse(HttpResponse response, HttpContext context) throws HttpException, IOException
AsyncResponseConsumerinformationResponse in interface AsyncResponseConsumer<T>response - the intermediate (1xx) HTTP response.context - the actual execution context.HttpExceptionIOExceptionprotected 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.HttpExceptionIOException