| Modifier and Type | Field and Description |
|---|---|
| private final AsyncResponseConsumer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | consume(final ByteBuffer
data source. src)Implements org. |
| public final void | consumePromise(final HttpRequest
the request message head used as a promise. promise, final HttpResponse the pushed response message. response, final EntityDetails the response entity details or entityDetails, final HttpContext null if the response
does not enclose an entity.the actual execution context. httpContext)Implements org. |
| public final void | failed(final Exception
the cause of the failure. cause)Implements org. |
| protected void | handleError(final HttpRequest
the promised request message. promise, final Exception the cause of error. cause)Triggered to handle the exception thrown while processing a push response. |
| protected abstract void | handleResponse(final HttpRequest
the promised request message. promise, final T the pushed response message. responseMessage)Triggered to handle the push message with the given promised request. |
| 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. |
| responseConsumer | back to summary |
|---|---|
| private final AsyncResponseConsumer<T> responseConsumer | |
| AbstractAsyncPushHandler | back to summary |
|---|---|
| public AbstractAsyncPushHandler(final AsyncResponseConsumer<T> responseConsumer) | |
| 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.
| |
| consumePromise | back to summary |
|---|---|
| public final void consumePromise(final HttpRequest promise, final HttpResponse response, final EntityDetails entityDetails, final HttpContext httpContext) throws HttpException, IOException Implements org. Doc from org. Triggered to signal receipt of a request message head used as a promise and the corresponding pushed response.
| |
| failed | back to summary |
|---|---|
| public final void failed(final Exception cause) Implements org. Doc from org. Triggered to signal a failure in data processing. | |
| handleError | back to summary |
|---|---|
| protected void handleError(final HttpRequest promise, final Exception cause) Triggered to handle the exception thrown while processing a push response.
| |
| handleResponse | back to summary |
|---|---|
| protected abstract void handleResponse(final HttpRequest promise, final T responseMessage) throws IOException, HttpException Triggered to handle the push message with the given promised request.
| |
| 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.
| |