Class BasicAsyncResponseProducer

java.lang.Object
org.apache.http.nio.protocol.BasicAsyncResponseProducer
All Implemented Interfaces:
Closeable, AutoCloseable, HttpAsyncResponseProducer

public class BasicAsyncResponseProducer extends Object implements HttpAsyncResponseProducer
Basic implementation of HttpAsyncResponseProducer. The producer can make use of the HttpAsyncContentProducer interface to efficiently stream out message content to the underlying non-blocking HTTP connection, if it is implemented by the HttpEntity inclosed in the response.
Since:
4.2
See Also:
  • Field Details

  • Constructor Details

    • BasicAsyncResponseProducer

      protected BasicAsyncResponseProducer(HttpResponse response, HttpAsyncContentProducer producer)
      Creates a producer that can be used to transmit the given response message. The given content producer will be used to stream out message content. Please note that the response message is expected to enclose an HttpEntity whose properties are consistent with the behavior of the content producer.
      Parameters:
      response - response message.
      producer - response content producer.
    • BasicAsyncResponseProducer

      public BasicAsyncResponseProducer(HttpResponse response)
      Creates a producer that can be used to transmit the given response message. If the response message encloses an HttpEntity it is also expected to implement HttpAsyncContentProducer.
      Parameters:
      response - response message.
  • Method Details