public final class SimpleResponseConsumer extends org.apache.hc.core5.http.nio.support.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(org.apache.hc.core5.http.HttpResponse response,
byte[] entity,
org.apache.hc.core5.http.ContentType contentType) |
static SimpleResponseConsumer |
create()
Creates a new SimpleResponseConsumer instance initialized with a new
SimpleAsyncEntityConsumer . |
void |
informationResponse(org.apache.hc.core5.http.HttpResponse response,
org.apache.hc.core5.http.protocol.HttpContext context) |
public static SimpleResponseConsumer create()
SimpleAsyncEntityConsumer
.public void informationResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException
org.apache.hc.core5.http.HttpException
IOException
protected SimpleHttpResponse buildResult(org.apache.hc.core5.http.HttpResponse response, byte[] entity, org.apache.hc.core5.http.ContentType contentType)
buildResult
in class org.apache.hc.core5.http.nio.support.AbstractAsyncResponseConsumer<SimpleHttpResponse,byte[]>
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.