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

public abstract Class AbstractBinAsyncEntityConsumer<T>

extends AbstractBinDataConsumer
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.BasicAsyncEntityConsumer
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.nio.AsyncEntityConsumer, org.apache.hc.core5.util.Args

Abstract binary entity content consumer.
Since
5.0

Field Summary

Modifier and TypeField and Description
private volatile T
private volatile FutureCallback<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final void
completed()

Implements abstract org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer.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.AbstractBinDataConsumer:
capacityIncrementconsumedatastreamEndupdateCapacity

Field Detail

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

Constructor Detail

AbstractBinAsyncEntityConsumerback to summary
public AbstractBinAsyncEntityConsumer()

Method Detail

completedback to summary
protected final void completed() throws IOException

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

Doc from org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer.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