Class BasicAsyncRequestProducer

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

public class BasicAsyncRequestProducer extends Object implements HttpAsyncRequestProducer
Basic implementation of HttpAsyncRequestProducer. 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 enclosed HttpEntity.
Since:
4.2
See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BasicAsyncRequestProducer(org.apache.http.HttpHost target, org.apache.http.HttpEntityEnclosingRequest request, HttpAsyncContentProducer producer)
    Creates a producer that can be used to transmit the given request message.
     
    BasicAsyncRequestProducer(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)
    Creates a producer that can be used to transmit the given request message.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    Invoked to signal that the response processing terminated abnormally.
    org.apache.http.HttpRequest
    Invoked to generate a HTTP request message head.
    org.apache.http.HttpHost
    Invoked to obtain the request target host.
    boolean
    Determines whether or not this producer is capable of producing HTTP request messages more than once.
    void
    Invoked to write out a chunk of content to the ContentEncoder.
    void
    requestCompleted(org.apache.http.protocol.HttpContext context)
    Invoked to signal that the request has been fully written out.
    void
    Invoked to reset the producer to its initial state.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BasicAsyncRequestProducer

      protected BasicAsyncRequestProducer(org.apache.http.HttpHost target, org.apache.http.HttpEntityEnclosingRequest request, HttpAsyncContentProducer producer)
      Creates a producer that can be used to transmit the given request message. The given content producer will be used to stream out message content. Please note that the request message is expected to enclose an HttpEntity whose properties are consistent with the behavior of the content producer.
      Parameters:
      target - target host.
      request - request message.
      producer - request content producer.
    • BasicAsyncRequestProducer

      public BasicAsyncRequestProducer(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)
      Creates a producer that can be used to transmit the given request message. If the request message encloses an HttpEntity it is also expected to implement HttpAsyncContentProducer.
      Parameters:
      target - target host.
      request - request message.
  • Method Details