public abstract class ResponseConsumer<Res>
extends org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>
限定符和类型 | 字段和说明 |
---|---|
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 |
构造器和说明 |
---|
ResponseConsumer(ResultParser resultParser,
TraceLogger traceLogger,
RetryStrategy retry,
Res lastResult) |
限定符和类型 | 方法和说明 |
---|---|
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
在类中 org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>
IOException
protected Res buildResult(org.apache.http.protocol.HttpContext context) throws Exception
protected ResponseContentWithMeta getResponseContentWithMeta() throws Exception
Exception
protected void onEntityEnclosed(org.apache.http.HttpEntity entity, org.apache.http.entity.ContentType contentType) throws IOException
onEntityEnclosed
在类中 org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>
IOException
protected void onContentReceived(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl) throws IOException
onContentReceived
在类中 org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>
IOException
protected void releaseResources()
releaseResources
在类中 org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<Res>
Copyright © 2018. All Rights Reserved.