public abstract class ResponseConsumer<Res>
extends org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.nio.util.SimpleInputBuffer |
buf |
protected static int |
BUFFER_SIZE |
protected ExecutionContext |
context |
protected org.apache.http.HttpResponse |
httpResponse |
protected Res |
lastResult |
protected ResultParser |
resultParser |
protected RetryStrategy |
retry |
protected TraceLogger |
traceLogger |
| Constructor and Description |
|---|
ResponseConsumer(ResultParser resultParser,
TraceLogger traceLogger,
RetryStrategy retry,
Res lastResult) |
| Modifier and Type | Method and Description |
|---|---|
protected Res |
buildResult(org.apache.http.protocol.HttpContext context) |
protected ResponseContentWithMeta |
getResponseContentWithMeta() |
protected void |
onContentReceived(org.apache.http.nio.ContentDecoder decoder,
org.apache.http.nio.IOControl ioctrl) |
protected void |
onEntityEnclosed(org.apache.http.HttpEntity entity,
org.apache.http.entity.ContentType contentType) |
protected void |
onResponseReceived(org.apache.http.HttpResponse response) |
protected abstract Res |
parseResult() |
protected void |
releaseResources() |
void |
setContext(ExecutionContext context) |
protected static final int BUFFER_SIZE
protected volatile org.apache.http.HttpResponse httpResponse
protected volatile org.apache.http.nio.util.SimpleInputBuffer buf
protected ResultParser resultParser
protected ExecutionContext context
protected TraceLogger traceLogger
protected RetryStrategy retry
protected Res lastResult
public ResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, Res lastResult)
public void setContext(ExecutionContext context)
protected void onResponseReceived(org.apache.http.HttpResponse response)
throws IOException
onResponseReceived in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>IOExceptionprotected Res buildResult(org.apache.http.protocol.HttpContext context) throws Exception
protected ResponseContentWithMeta getResponseContentWithMeta() throws Exception
Exceptionprotected void onEntityEnclosed(org.apache.http.HttpEntity entity,
org.apache.http.entity.ContentType contentType)
throws IOException
onEntityEnclosed in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>IOExceptionprotected void onContentReceived(org.apache.http.nio.ContentDecoder decoder,
org.apache.http.nio.IOControl ioctrl)
throws IOException
onContentReceived in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>IOExceptionprotected void releaseResources()
releaseResources in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>Copyright © 2024. All Rights Reserved.