public final class SimpleResponseConsumer extends AbstractAsyncResponseConsumer<SimpleHttpResponse,byte[]>
SimpleHttpResponse instance based on events
of an incoming data stream.
IMPORTANT: SimpleHttpResponses are intended for simple scenarios where entities inclosed
in responses are known to be small. It is generally recommended to use streaming
AsyncResponseConsumers, for instance, such as based on
AbstractCharResponseConsumer or AbstractBinResponseConsumer.
SimpleBody,
SimpleHttpResponse,
AbstractCharResponseConsumer,
AbstractBinResponseConsumer| 限定符和类型 | 方法和说明 |
|---|---|
protected SimpleHttpResponse |
buildResult(HttpResponse response,
byte[] entity,
ContentType contentType)
Triggered to generate object that represents a result of response message processing.
|
static SimpleResponseConsumer |
create() |
void |
informationResponse(HttpResponse response,
HttpContext context)
Triggered to signal receipt of an intermediate (1xx) HTTP response.
|
consume, consumeResponse, failed, releaseResources, streamEnd, updateCapacitypublic static SimpleResponseConsumer create()
public void informationResponse(HttpResponse response, HttpContext context) throws HttpException, IOException
AsyncResponseConsumerresponse - the intermediate (1xx) HTTP response.context - the actual execution context.HttpExceptionIOExceptionprotected SimpleHttpResponse buildResult(HttpResponse response, byte[] entity, ContentType contentType)
AbstractAsyncResponseConsumerbuildResult 在类中 AbstractAsyncResponseConsumer<SimpleHttpResponse,byte[]>response - the response message.entity - the response entity.contentType - the response content type.Copyright © 2023. All rights reserved.