@ThreadSafe public class BasicAsyncResponseConsumer extends AbstractAsyncResponseConsumer<HttpResponse>
HttpAsyncResponseConsumer. Please note that
this consumer buffers response content in memory and should be used for
relatively small response messages.| 构造器和说明 |
|---|
BasicAsyncResponseConsumer() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected HttpResponse |
buildResult(HttpContext context)
Invoked to generate a result object from the received HTTP response
message.
|
protected void |
onContentReceived(ContentDecoder decoder,
IOControl ioctrl)
Invoked to process a chunk of content from the
ContentDecoder. |
protected void |
onEntityEnclosed(HttpEntity entity,
ContentType contentType)
Invoked if the response message encloses a content entity.
|
protected void |
onResponseReceived(HttpResponse response)
Invoked when a HTTP response message is received.
|
protected void |
releaseResources()
Invoked to release all system resources currently tlb.
|
cancel, close, consumeContent, failed, getException, getResult, isDone, onClose, responseCompleted, responseReceivedprotected void onResponseReceived(HttpResponse response) throws java.io.IOException
AbstractAsyncResponseConsumerAbstractAsyncResponseConsumer.onContentReceived(ContentDecoder, IOControl) method
will be invoked only if the response messages has a content entity
enclosed.onResponseReceived 在类中 AbstractAsyncResponseConsumer<HttpResponse>response - HTTP response message.java.io.IOException - in case of an I/O errorprotected void onEntityEnclosed(HttpEntity entity, ContentType contentType) throws java.io.IOException
AbstractAsyncResponseConsumeronEntityEnclosed 在类中 AbstractAsyncResponseConsumer<HttpResponse>entity - HTTP entitycontentType - expected content category.java.io.IOException - in case of an I/O errorprotected void onContentReceived(ContentDecoder decoder, IOControl ioctrl) throws java.io.IOException
AbstractAsyncResponseConsumerContentDecoder.
The IOControl interface can be used to suspend input events
if the consumer is temporarily unable to consume more content.
The consumer can use the ContentDecoder.isCompleted() method
to find out whether or not the message content has been fully consumed.onContentReceived 在类中 AbstractAsyncResponseConsumer<HttpResponse>decoder - content decoder.ioctrl - I/O control of the underlying connection.java.io.IOException - in case of an I/O errorprotected void releaseResources()
AbstractAsyncResponseConsumerprotected HttpResponse buildResult(HttpContext context)
AbstractAsyncResponseConsumerbuildResult 在类中 AbstractAsyncResponseConsumer<HttpResponse>context - HTTP context.