AsyncEntityConsumer
to process request message content.
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicReference | |
| private final Supplier |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract T | Returns: the result of request processing.the request message. request, E the request entity. entity, ContentType the request content type. contentType)Triggered to generate object that represents a result of request message processing. |
| public final void | consume(final ByteBuffer
data source. src)Implements org. |
| public final void | consumeRequest(final HttpRequest
the request message head. request, final EntityDetails the request entity details or entityDetails, final HttpContext null if the request
does not enclose an entity.the actual execution context. httpContext, final FutureCallback<T> the result callback called when request processing
has been completed successfully or unsuccessfully. resultCallback)Implements org. |
| public final void | failed(final Exception
the cause of the failure. cause)Implements org. |
| public final void | |
| public final void | streamEnd(final List<? extends Header>
data stream trailers. trailers)Implements org. |
| public final void | updateCapacity(final CapacityChannel
the channel for capacity updates. capacityChannel)Implements org. |
| dataConsumerRef | back to summary |
|---|---|
| private final AtomicReference<AsyncEntityConsumer<E>> dataConsumerRef | |
| dataConsumerSupplier | back to summary |
|---|---|
| private final Supplier<AsyncEntityConsumer<E>> dataConsumerSupplier | |
| AbstractAsyncRequesterConsumer | back to summary |
|---|---|
| public AbstractAsyncRequesterConsumer(final Supplier<AsyncEntityConsumer<E>> dataConsumerSupplier) | |
| AbstractAsyncRequesterConsumer | back to summary |
|---|---|
| public AbstractAsyncRequesterConsumer(final AsyncEntityConsumer<E> dataConsumer) | |
| buildResult | back to summary |
|---|---|
| protected abstract T buildResult(HttpRequest request, E entity, ContentType contentType) Triggered to generate object that represents a result of request message processing.
| |
| consume | back to summary |
|---|---|
| public final void consume(final ByteBuffer src) throws IOException Implements org. Doc from org. Triggered to pass incoming data to the data consumer. The consumer must consume the entire content of the data buffer. The consumer must stop incrementing its capacity on the capacity channel if it is unable to accept more data. Once the data consumer has handled accumulated data or allocated more intermediate storage it can update its capacity information on the capacity channel.
| |
| consumeRequest | back to summary |
|---|---|
| public final void consumeRequest(final HttpRequest request, final EntityDetails entityDetails, final HttpContext httpContext, final FutureCallback<T> resultCallback) throws HttpException, IOException Implements org. Doc from org. Triggered to signal receipt of a request message head.
| |
| failed | back to summary |
|---|---|
| public final void failed(final Exception cause) Implements org. Doc from org. Triggered to signal a failure in data processing. | |
| releaseResources | back to summary |
|---|---|
| public final void releaseResources() Implements org.
| |
| streamEnd | back to summary |
|---|---|
| public final void streamEnd(final List<? extends Header> trailers) throws HttpException, IOException Implements org. Doc from org. Triggered to signal termination of the data stream. | |
| updateCapacity | back to summary |
|---|---|
| public final void updateCapacity(final CapacityChannel capacityChannel) throws IOException Implements org. Doc from org. Triggered to signal ability of the underlying data stream to receive data capacity update. The data consumer can choose to write data immediately inside the call or asynchronously at some later point.
| |