Class MinimalClientExchangeHandlerImpl<T>

java.lang.Object
org.apache.http.impl.nio.client.AbstractClientExchangeHandler
org.apache.http.impl.nio.client.MinimalClientExchangeHandlerImpl<T>
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.http.concurrent.Cancellable, org.apache.http.nio.protocol.HttpAsyncClientExchangeHandler

class MinimalClientExchangeHandlerImpl<T> extends AbstractClientExchangeHandler
Default implementation of HttpAsyncClientExchangeHandler.

Instances of this class are expected to be accessed by one thread at a time only. The AbstractClientExchangeHandler.cancel() method can be called concurrently by multiple threads.

  • Field Details

    • requestProducer

      private final org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer
    • responseConsumer

      private final org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer
    • localContext

      private final org.apache.http.client.protocol.HttpClientContext localContext
    • resultFuture

      private final org.apache.http.concurrent.BasicFuture<T> resultFuture
    • httpProcessor

      private final org.apache.http.protocol.HttpProcessor httpProcessor
  • Constructor Details

    • MinimalClientExchangeHandlerImpl

      public MinimalClientExchangeHandlerImpl(org.apache.commons.logging.Log log, org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.client.protocol.HttpClientContext localContext, org.apache.http.concurrent.BasicFuture<T> resultFuture, NHttpClientConnectionManager connmgr, org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.ConnectionReuseStrategy connReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy)
  • Method Details

    • releaseResources

      void releaseResources()
      Specified by:
      releaseResources in class AbstractClientExchangeHandler
    • executionFailed

      void executionFailed(Exception ex)
      Specified by:
      executionFailed in class AbstractClientExchangeHandler
    • executionCancelled

      boolean executionCancelled()
      Specified by:
      executionCancelled in class AbstractClientExchangeHandler
    • start

      public void start() throws org.apache.http.HttpException, IOException
      Throws:
      org.apache.http.HttpException
      IOException
    • generateRequest

      public org.apache.http.HttpRequest generateRequest() throws IOException, org.apache.http.HttpException
      Throws:
      IOException
      org.apache.http.HttpException
    • produceContent

      public void produceContent(org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl) throws IOException
      Throws:
      IOException
    • requestCompleted

      public void requestCompleted()
    • responseReceived

      public void responseReceived(org.apache.http.HttpResponse response) throws IOException, org.apache.http.HttpException
      Throws:
      IOException
      org.apache.http.HttpException
    • consumeContent

      public void consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl) throws IOException
      Throws:
      IOException
    • responseCompleted

      public void responseCompleted() throws IOException, org.apache.http.HttpException
      Throws:
      IOException
      org.apache.http.HttpException
    • inputTerminated

      public void inputTerminated()
    • abortConnection

      public void abortConnection()