public abstract class AbstractBinPushConsumer extends AbstractBinDataConsumer implements AsyncPushConsumer
Constructor and Description |
---|
AbstractBinPushConsumer() |
Modifier and Type | Method and Description |
---|---|
void |
consumePromise(HttpRequest promise,
HttpResponse response,
EntityDetails entityDetails,
HttpContext context)
Triggered to signal receipt of a request message head used as a promise
and the corresponding pushed response.
|
void |
failed(Exception cause)
Triggered to signal a failure in data processing.
|
protected abstract void |
start(HttpRequest promise,
HttpResponse response,
ContentType contentType)
Triggered to signal the beginning of response processing.
|
capacityIncrement, completed, consume, data, streamEnd, updateCapacity
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
consume, streamEnd, updateCapacity
releaseResources
public final void consumePromise(HttpRequest promise, HttpResponse response, EntityDetails entityDetails, HttpContext context) throws HttpException, IOException
AsyncPushConsumer
consumePromise
in interface AsyncPushConsumer
promise
- the request message head used as a promise.response
- the pushed response message.entityDetails
- the response entity details or null
if the response
does not enclose an entity.context
- the actual execution context.HttpException
IOException
public void failed(Exception cause)
AsyncPushConsumer
failed
in interface AsyncPushConsumer
cause
- the cause of the failure.protected abstract void start(HttpRequest promise, HttpResponse response, ContentType contentType) throws HttpException, IOException
response
- the response message headcontentType
- the content type of the response body,
or null
if the response does not enclose a response entity.HttpException
IOException