public final class SimpleResponseConsumer extends AbstractAsyncResponseConsumer<SimpleHttpResponse,byte[]>
SimpleHttpResponse
instance based on events
of an incoming data stream.
IMPORTANT: SimpleHttpResponse
s are intended for simple scenarios where entities inclosed
in responses are known to be small. It is generally recommended to use streaming
AsyncResponseConsumer
s, for instance, such as based on
AbstractCharResponseConsumer
or AbstractBinResponseConsumer
.
SimpleBody
,
SimpleHttpResponse
,
AbstractCharResponseConsumer
,
AbstractBinResponseConsumer
Modifier and Type | Method and Description |
---|---|
protected SimpleHttpResponse |
buildResult(HttpResponse response,
byte[] entity,
ContentType contentType) |
static SimpleResponseConsumer |
create() |
void |
informationResponse(HttpResponse response,
HttpContext context) |
consume, consumeResponse, failed, releaseResources, streamEnd, updateCapacity
public static SimpleResponseConsumer create()
public void informationResponse(HttpResponse response, HttpContext context) throws HttpException, IOException
HttpException
IOException
protected SimpleHttpResponse buildResult(HttpResponse response, byte[] entity, ContentType contentType)
buildResult
in class AbstractAsyncResponseConsumer<SimpleHttpResponse,byte[]>
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.