Class BasicAsyncRequestExecutionHandler<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean cancel()
      Deprecated.
       
      void close()
      Deprecated.
       
      void consumeContent​(ContentDecoder decoder, IOControl ioctrl)
      Deprecated.
      Invoked to process a chunk of content from the ContentDecoder.
      void failed​(java.lang.Exception ex)
      Deprecated.
      Invoked to signal that the response processing terminated abnormally.
      org.apache.http.HttpRequest generateRequest()
      Deprecated.
      Invoked to generate a HTTP request message head.
      org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
      Deprecated.
      Returns ConnectionReuseStrategy implementation to be used to determine whether or not the underlying connection can be kept alive after a particular HTTP request / response exchange.
      org.apache.http.protocol.HttpContext getContext()
      Deprecated.
      Returns shared HttpContext instance.
      java.lang.Exception getException()
      Deprecated.
      Returns an exception in case of an abnormal termination.
      java.util.concurrent.Future<T> getFuture()
      Deprecated.
       
      org.apache.http.protocol.HttpProcessor getHttpProcessor()
      Deprecated.
      Returns HttpProcessor implementation to be used to process HTTP request and response messages for protocol compliance.
      T getResult()
      Deprecated.
      Returns a result of the response processing, when available.
      org.apache.http.HttpHost getTarget()
      Deprecated.
      Invoked to obtain the request target host.
      boolean isDone()
      Deprecated.
      Determines whether or not the response processing completed.
      boolean isRepeatable()
      Deprecated.
      Determines whether or not this producer is capable of producing HTTP request messages more than once.
      void produceContent​(ContentEncoder encoder, IOControl ioctrl)
      Deprecated.
      Invoked to write out a chunk of content to the ContentEncoder.
      void requestCompleted​(org.apache.http.protocol.HttpContext context)
      Deprecated.
      Invoked to signal that the request has been fully written out.
      void resetRequest()
      Deprecated.
      Invoked to reset the producer to its initial state.
      void responseCompleted​(org.apache.http.protocol.HttpContext context)
      Deprecated.
      Invoked to signal that the response has been fully processed.
      void responseReceived​(org.apache.http.HttpResponse response)
      Deprecated.
      Invoked when a HTTP response message is received.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicAsyncRequestExecutionHandler

        public BasicAsyncRequestExecutionHandler​(HttpAsyncRequestProducer requestProducer,
                                                 HttpAsyncResponseConsumer<T> responseConsumer,
                                                 org.apache.http.concurrent.FutureCallback<T> callback,
                                                 org.apache.http.protocol.HttpContext localContext,
                                                 org.apache.http.protocol.HttpProcessor httppocessor,
                                                 org.apache.http.ConnectionReuseStrategy reuseStrategy,
                                                 org.apache.http.params.HttpParams params)
        Deprecated.
      • BasicAsyncRequestExecutionHandler

        public BasicAsyncRequestExecutionHandler​(HttpAsyncRequestProducer requestProducer,
                                                 HttpAsyncResponseConsumer<T> responseConsumer,
                                                 org.apache.http.protocol.HttpContext localContext,
                                                 org.apache.http.protocol.HttpProcessor httppocessor,
                                                 org.apache.http.ConnectionReuseStrategy reuseStrategy,
                                                 org.apache.http.params.HttpParams params)
        Deprecated.
    • Method Detail

      • getFuture

        public java.util.concurrent.Future<T> getFuture()
        Deprecated.
      • close

        public void close()
                   throws java.io.IOException
        Deprecated.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • generateRequest

        public org.apache.http.HttpRequest generateRequest()
                                                    throws java.io.IOException,
                                                           org.apache.http.HttpException
        Deprecated.
        Description copied from interface: HttpAsyncRequestProducer
        Invoked to generate a HTTP request message head. The message is expected to implement the HttpEntityEnclosingRequest interface if it is to enclose a content entity. The HttpAsyncRequestProducer.produceContent( ContentEncoder, IOControl) method will not be invoked if HttpEntityEnclosingRequest.getEntity() returns null.
        Specified by:
        generateRequest in interface HttpAsyncRequestProducer
        Returns:
        HTTP request message.
        Throws:
        java.io.IOException - in case of an I/O error
        org.apache.http.HttpException - in case of HTTP protocol violation
      • produceContent

        public void produceContent​(ContentEncoder encoder,
                                   IOControl ioctrl)
                            throws java.io.IOException
        Deprecated.
        Description copied from interface: HttpAsyncRequestProducer
        Invoked to write out a chunk of content to the ContentEncoder. The IOControl interface can be used to suspend output event notifications if the producer is temporarily unable to produce more content.

        When all content is finished, the producer MUST call ContentEncoder.complete(). Failure to do so may cause the entity to be incorrectly delimited.

        Please note that the ContentEncoder object is not thread-safe and should only be used within the context of this method call. The IOControl object can be shared and used on other thread to resume output event notifications when more content is made available.

        Specified by:
        produceContent in interface HttpAsyncRequestProducer
        Parameters:
        encoder - content encoder.
        ioctrl - I/O control of the underlying connection.
        Throws:
        java.io.IOException - in case of an I/O error
      • requestCompleted

        public void requestCompleted​(org.apache.http.protocol.HttpContext context)
        Deprecated.
        Description copied from interface: HttpAsyncRequestProducer
        Invoked to signal that the request has been fully written out.
        Specified by:
        requestCompleted in interface HttpAsyncRequestProducer
        Parameters:
        context - HTTP context
      • resetRequest

        public void resetRequest()
        Deprecated.
        Description copied from interface: HttpAsyncRequestProducer
        Invoked to reset the producer to its initial state. Repeatable request producers are expected to release currently allocated resources that are no longer needed or re-acquire resources needed to repeat the process.
        Specified by:
        resetRequest in interface HttpAsyncRequestProducer
      • responseReceived

        public void responseReceived​(org.apache.http.HttpResponse response)
                              throws java.io.IOException,
                                     org.apache.http.HttpException
        Deprecated.
        Description copied from interface: HttpAsyncResponseConsumer
        Invoked when a HTTP response message is received. Please note that the HttpAsyncResponseConsumer.consumeContent(ContentDecoder, IOControl) method will be invoked only if the response messages has a content entity enclosed.
        Specified by:
        responseReceived in interface HttpAsyncResponseConsumer<T>
        Parameters:
        response - HTTP response message.
        Throws:
        java.io.IOException - in case of an I/O error
        org.apache.http.HttpException - in case of HTTP protocol violation
      • consumeContent

        public void consumeContent​(ContentDecoder decoder,
                                   IOControl ioctrl)
                            throws java.io.IOException
        Deprecated.
        Description copied from interface: HttpAsyncResponseConsumer
        Invoked to process a chunk of content from the ContentDecoder. The IOControl interface can be used to suspend input event notifications if the consumer is temporarily unable to process content.

        The consumer can use the ContentDecoder.isCompleted() method to find out whether or not the message content has been fully consumed.

        Please note that the ContentDecoder object is not thread-safe and should only be used within the context of this method call. The IOControl object can be shared and used on other thread to resume input event notifications when the consumer is capable of processing more content.

        Specified by:
        consumeContent in interface HttpAsyncResponseConsumer<T>
        Parameters:
        decoder - content decoder.
        ioctrl - I/O control of the underlying connection.
        Throws:
        java.io.IOException - in case of an I/O error
      • cancel

        public boolean cancel()
        Deprecated.
        Specified by:
        cancel in interface org.apache.http.concurrent.Cancellable
      • responseCompleted

        public void responseCompleted​(org.apache.http.protocol.HttpContext context)
        Deprecated.
        Description copied from interface: HttpAsyncResponseConsumer
        Invoked to signal that the response has been fully processed.
        Specified by:
        responseCompleted in interface HttpAsyncResponseConsumer<T>
        Parameters:
        context - HTTP context
      • getConnectionReuseStrategy

        public org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
        Deprecated.
        Description copied from interface: HttpAsyncRequestExecutionHandler
        Returns ConnectionReuseStrategy implementation to be used to determine whether or not the underlying connection can be kept alive after a particular HTTP request / response exchange.
        Specified by:
        getConnectionReuseStrategy in interface HttpAsyncRequestExecutionHandler<T>
        Returns:
        connection re-use strategy.