T
- response message representation.public abstract class AbstractCharResponseConsumer<T>
extends org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
implements org.apache.hc.core5.http.nio.AsyncResponseConsumer<T>
Modifier | Constructor and Description |
---|---|
|
AbstractCharResponseConsumer() |
protected |
AbstractCharResponseConsumer(int bufSize,
org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
buildResult()
Triggered to generate object that represents a result of response message processing.
|
protected void |
completed() |
void |
consumeResponse(org.apache.hc.core5.http.HttpResponse response,
org.apache.hc.core5.http.EntityDetails entityDetails,
org.apache.hc.core5.http.protocol.HttpContext context,
org.apache.hc.core5.concurrent.FutureCallback<T> resultCallback) |
void |
failed(Exception cause) |
void |
informationResponse(org.apache.hc.core5.http.HttpResponse response,
org.apache.hc.core5.http.protocol.HttpContext context) |
protected abstract void |
start(org.apache.hc.core5.http.HttpResponse response,
org.apache.hc.core5.http.ContentType contentType)
Triggered to signal the beginning of data processing.
|
capacityIncrement, consume, data, setCharset, streamEnd, updateCapacity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AbstractCharResponseConsumer()
protected AbstractCharResponseConsumer(int bufSize, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig)
protected abstract void start(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.ContentType contentType) throws org.apache.hc.core5.http.HttpException, IOException
response
- the response message headcontentType
- the content type of the response body,
or null
if the response does not enclose a response entity.org.apache.hc.core5.http.HttpException
IOException
protected abstract T buildResult() throws IOException
IOException
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
informationResponse
in interface org.apache.hc.core5.http.nio.AsyncResponseConsumer<T>
org.apache.hc.core5.http.HttpException
IOException
public final void consumeResponse(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> resultCallback) throws org.apache.hc.core5.http.HttpException, IOException
consumeResponse
in interface org.apache.hc.core5.http.nio.AsyncResponseConsumer<T>
org.apache.hc.core5.http.HttpException
IOException
protected final void completed() throws IOException
completed
in class org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
IOException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.