org.apache.hc.core5.http.nio

## Interface AsyncPushProducer

- All Superinterfaces:
    AsyncDataProducer, ResourceHolder
  All Known Implementing Classes:
    BasicPushProducer

      public interface AsyncPushProducer
      extends AsyncDataProducer

  Abstract asynchronous push response producer.
  Since:
    5.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `failed(Exception cause)` Triggered to signal a failure in data generation.
    `void` | `produceResponse(ResponseChannel channel, HttpContext context)` Triggered to signal the ability of the underlying response channel to accept response messages.

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

      `available, produce`

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

      `releaseResources`

- - ### Method Detail

    - #### produceResponse

          void produceResponse(ResponseChannel channel,
                               HttpContext context)
                        throws HttpException,
                               IOException

      Triggered to signal the ability of the underlying response channel to accept response messages. The data producer can choose to send a final response message immediately inside the call or asynchronously at some later point. The final response can be preceded by a number of intermediate messages.
      Parameters:
        `channel` - the response channel capable to accepting response messages.
        `context` - the actual execution context.
      Throws:
        `HttpException` - in case of an HTTP protocol violation.
        `IOException` - in case of an I/O error.

    - #### failed

          void failed(Exception cause)

      Triggered to signal a failure in data generation.
      Parameters:
        `cause` - the cause of the failure.

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