Top Description Fields Constructors Methods
org.apache.hc.core5.http.nio.entity

public abstract Class AbstractCharAsyncEntityConsumer<T>

extends AbstractCharDataConsumer
implements AsyncEntityConsumer<T>
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.nio.AsyncEntityConsumer, org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.ResourceHolder
Known Direct Subclasses
org.apache.hc.core5.http.nio.entity.StringAsyncEntityConsumer
Type Parameters
<T>
entity representation.
Imports
java.io.IOException, .UnsupportedEncodingException, java.nio.charset.UnsupportedCharsetException, org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.http.ContentType, .EntityDetails, .HttpException, org.apache.hc.core5.http.config.CharCodingConfig, org.apache.hc.core5.http.nio.AsyncEntityConsumer, org.apache.hc.core5.util.Args

Abstract text entity content consumer.
Since
5.0

Field Summary

Modifier and TypeField and Description
private volatile T
private volatile FutureCallback<T>
Inherited from org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer:
DEF_BUF_SIZE

Constructor Summary

AccessConstructor and Description
protected
AbstractCharAsyncEntityConsumer(final int bufSize, final CharCodingConfig charCodingConfig)

public

Method Summary

Modifier and TypeMethod and Description
protected final void
completed()

Implements abstract org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer.completed.

Triggered to signal completion of data processing.
public final void
failed(final Exception
the cause of the failure.
cause
)

Implements org.apache.hc.core5.http.nio.AsyncEntityConsumer.failed.

Triggered to signal a failure in data processing.
protected abstract T

Returns:

the entity content
generateContent
()

Triggered to generate entity representation.

public final T
getContent()

Implements org.apache.hc.core5.http.nio.AsyncEntityConsumer.getContent.

Returns the result of entity processing when it becomes available or null if the entity is still being received.
protected abstract void
streamStart(ContentType
the entity content type
contentType
)

Triggered to signal beginning of entity content stream.

public final void
streamStart(final EntityDetails
the details of the incoming message entity.
entityDetails
,
final FutureCallback<T>
the result callback.
resultCallback
)

Implements org.apache.hc.core5.http.nio.AsyncEntityConsumer.streamStart.

Signals beginning of an incoming request entity stream.
Inherited from org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer:
capacityIncrementconsumedatasetCharsetstreamEndupdateCapacity

Field Detail

contentback to summary
private volatile T content
resultCallbackback to summary
private volatile FutureCallback<T> resultCallback

Constructor Detail

AbstractCharAsyncEntityConsumerback to summary
protected AbstractCharAsyncEntityConsumer(final int bufSize, final CharCodingConfig charCodingConfig)
AbstractCharAsyncEntityConsumerback to summary
public AbstractCharAsyncEntityConsumer()

Method Detail

completedback to summary
protected final void completed() throws IOException

Implements abstract org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer.completed.

Doc from org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer.completed.

Triggered to signal completion of data processing.

Annotations
@Override
failedback to summary
public final void failed(final Exception cause)

Implements org.apache.hc.core5.http.nio.AsyncEntityConsumer.failed.

Doc from org.apache.hc.core5.http.nio.AsyncEntityConsumer.failed.

Triggered to signal a failure in data processing.

Parameters
cause:Exception

the cause of the failure.

Annotations
@Override
generateContentback to summary
protected abstract T generateContent() throws IOException

Triggered to generate entity representation.

Returns:T

the entity content

getContentback to summary
public final T getContent()

Implements org.apache.hc.core5.http.nio.AsyncEntityConsumer.getContent.

Doc from org.apache.hc.core5.http.nio.AsyncEntityConsumer.getContent.

Returns the result of entity processing when it becomes available or null if the entity is still being received.

Returns:T

the response processing result.

Annotations
@Override
streamStartback to summary
protected abstract void streamStart(ContentType contentType) throws HttpException, IOException

Triggered to signal beginning of entity content stream.

Parameters
contentType:ContentType

the entity content type

streamStartback to summary
public final void streamStart(final EntityDetails entityDetails, final FutureCallback<T> resultCallback) throws IOException, HttpException

Implements org.apache.hc.core5.http.nio.AsyncEntityConsumer.streamStart.

Doc from org.apache.hc.core5.http.nio.AsyncEntityConsumer.streamStart.

Signals beginning of an incoming request entity stream.

Parameters
entityDetails:EntityDetails

the details of the incoming message entity.

resultCallback:FutureCallback<T>

the result callback.

Annotations
@Override