T - response message representation.public abstract class AbstractCharResponseConsumer<T> extends AbstractCharDataConsumer implements AsyncResponseConsumer<T>
DEF_BUF_SIZE| 构造器和说明 |
|---|
AbstractCharResponseConsumer() |
| 限定符和类型 | 方法和说明 |
|---|---|
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, streamEnd, updateCapacityreleaseResourcesprotected 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
AsyncResponseConsumerinformationResponse 在接口中 AsyncResponseConsumer<T>response - the intermediate (1xx) HTTP response.context - the actual execution context.HttpExceptionIOExceptionpublic final void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context, FutureCallback<T> resultCallback) throws HttpException, IOException
AsyncResponseConsumerconsumeResponse 在接口中 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.HttpExceptionIOExceptionprotected final void completed()
throws IOException
AbstractCharDataConsumercompleted 在类中 AbstractCharDataConsumerIOExceptionpublic void failed(Exception cause)
AsyncResponseConsumerfailed 在接口中 AsyncResponseConsumer<T>cause - the cause of the failure.Copyright © 2023. All rights reserved.