Top Description Constructors Methods
org.apache.hc.client5.http.async.methods

public abstract Class AbstractBinPushConsumer

extends AbstractBinDataConsumer
implements AsyncPushConsumer
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.nio.AsyncPushConsumer, org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.ResourceHolder
Imports
java.io.IOException, .UnsupportedEncodingException, java.nio.charset.UnsupportedCharsetException, org.apache.hc.core5.http.ContentType, .EntityDetails, .HttpException, .HttpRequest, .HttpResponse, org.apache.hc.core5.http.nio.AsyncPushConsumer, org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer, org.apache.hc.core5.http.protocol.HttpContext

Abstract push response consumer that processes response body data as an octet stream.
Since
5.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
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 null if the response does not enclose an entity.
entityDetails
,
final HttpContext
the actual execution context.
context
)

Implements org.apache.hc.core5.http.nio.AsyncPushConsumer.consumePromise.

Triggered to signal receipt of a request message head used as a promise and the corresponding pushed response.
public void
failed(final Exception
the cause of the failure.
cause
)

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

Triggered to signal a failure in data processing.
protected abstract void
start(HttpRequest promise, HttpResponse
the response message head
response
,
ContentType
the content type of the response body, or null if the response does not enclose a response entity.
contentType
)

Triggered to signal the beginning of response processing.

Inherited from org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer:
capacityIncrementcompletedconsumedatastreamEndupdateCapacity

Constructor Detail

AbstractBinPushConsumerback to summary
public AbstractBinPushConsumer()

Method Detail

consumePromiseback to summary
public final void consumePromise(final HttpRequest promise, final HttpResponse response, final EntityDetails entityDetails, final HttpContext context) throws HttpException, IOException

Implements org.apache.hc.core5.http.nio.AsyncPushConsumer.consumePromise.

Doc from org.apache.hc.core5.http.nio.AsyncPushConsumer.consumePromise.

Triggered to signal receipt of a request message head used as a promise and the corresponding pushed response.

Parameters
promise:HttpRequest

the request message head used as a promise.

response:HttpResponse

the pushed response message.

entityDetails:EntityDetails

the response entity details or null if the response does not enclose an entity.

context:HttpContext

the actual execution context.

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

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

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

Triggered to signal a failure in data processing.

Parameters
cause:Exception

the cause of the failure.

Annotations
@Override
startback to summary
protected abstract void start(HttpRequest promise, HttpResponse response, ContentType contentType) throws HttpException, IOException

Triggered to signal the beginning of response processing.

Parameters
response:HttpResponse

the response message head

contentType:ContentType

the content type of the response body, or null if the response does not enclose a response entity.