Class AbstractCharPushConsumer
- java.lang.Object
-
- org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
-
- org.apache.hc.client5.http.async.methods.AbstractCharPushConsumer
-
- All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer,org.apache.hc.core5.http.nio.AsyncPushConsumer,org.apache.hc.core5.http.nio.ResourceHolder
public abstract class AbstractCharPushConsumer extends org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer implements org.apache.hc.core5.http.nio.AsyncPushConsumerAbstract push response consumer that processes response body data as a character stream.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.CharsetdefaultCharset
-
Constructor Summary
Constructors Modifier Constructor Description AbstractCharPushConsumer()protectedAbstractCharPushConsumer(int bufSize, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconsumePromise(org.apache.hc.core5.http.HttpRequest promise, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context)voidfailed(java.lang.Exception cause)protected abstract voidstart(org.apache.hc.core5.http.HttpRequest promise, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.ContentType contentType)Triggered to signal the beginning of data processing.-
Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
capacityIncrement, completed, consume, data, setCharset, streamEnd, updateCapacity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
start
protected abstract void start(org.apache.hc.core5.http.HttpRequest promise, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.ContentType contentType) throws org.apache.hc.core5.http.HttpException, java.io.IOExceptionTriggered to signal the beginning of data processing.- Parameters:
response- the response message headcontentType- the content type of the response body, ornullif the response does not enclose a response entity.- Throws:
org.apache.hc.core5.http.HttpExceptionjava.io.IOException
-
consumePromise
public final void consumePromise(org.apache.hc.core5.http.HttpRequest promise, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, java.io.IOException- Specified by:
consumePromisein interfaceorg.apache.hc.core5.http.nio.AsyncPushConsumer- Throws:
org.apache.hc.core5.http.HttpExceptionjava.io.IOException
-
failed
public void failed(java.lang.Exception cause)
- Specified by:
failedin interfaceorg.apache.hc.core5.http.nio.AsyncPushConsumer
-
-