org.apache.hc.client5.http.async.methods

## Class AbstractBinPushConsumer

- java.lang.Object
- - org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
  - - org.apache.hc.client5.http.async.methods.AbstractBinPushConsumer

- All Implemented Interfaces:
    org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.AsyncPushConsumer, org.apache.hc.core5.http.nio.ResourceHolder

      public abstract class AbstractBinPushConsumer
      extends org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
      implements org.apache.hc.core5.http.nio.AsyncPushConsumer

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractBinPushConsumer()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `consumePromise(org.apache.hc.core5.http.HttpRequest promise, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext context)`
    `void` | `failed(Exception cause)`
    `protected abstract void` | `start(org.apache.hc.core5.http.HttpRequest promise, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.ContentType contentType)` Triggered to signal the beginning of response processing.

    - ### Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer

      `capacityIncrement, completed, consume, data, streamEnd, updateCapacity`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer

      `consume, streamEnd, updateCapacity`

    - ### Methods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder

      `releaseResources`

- - ### Constructor Detail

    - #### AbstractBinPushConsumer

          public AbstractBinPushConsumer()

  - ### Method Detail

    - #### start

          protected abstract void start(org.apache.hc.core5.http.HttpRequest promise,
                                        org.apache.hc.core5.http.HttpResponse response,
                                        org.apache.hc.core5.http.ContentType contentType)
                                 throws org.apache.hc.core5.http.HttpException,
                                        IOException

      Triggered to signal the beginning of response processing.
      Parameters:
        `response` - the response message head
        `contentType` - the content type of the response body, or `null` if the response does not enclose a response entity.
      Throws:
        `org.apache.hc.core5.http.HttpException` - If a protocol error occurs.
        `IOException` - If an I/O error occurs.

    - #### consumePromise

          public final void consumePromise(org.apache.hc.core5.http.HttpRequest promise,
                                           org.apache.hc.core5.http.HttpResponse response,
                                           org.apache.hc.core5.http.EntityDetails entityDetails,
                                           org.apache.hc.core5.http.protocol.HttpContext context)
                                    throws org.apache.hc.core5.http.HttpException,
                                           IOException

      Specified by:
        `consumePromise` in interface `org.apache.hc.core5.http.nio.AsyncPushConsumer`
      Throws:
        `org.apache.hc.core5.http.HttpException`
        `IOException`

    - #### failed

          public void failed(Exception cause)

      Specified by:
        `failed` in interface `org.apache.hc.core5.http.nio.AsyncPushConsumer`

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.