Interface AsyncClientExchangeHandler

All Superinterfaces:
AsyncDataConsumer, AsyncDataExchangeHandler, AsyncDataProducer, ResourceHolder
All Known Implementing Classes:
BasicClientExchangeHandler

public interface AsyncClientExchangeHandler extends AsyncDataExchangeHandler
Abstract asynchronous client side message exchange handler that acts as a request producer and a response consumer.
Since:
5.0
  • Method Details

    • produceRequest

      void produceRequest(RequestChannel channel, HttpContext context) throws HttpException, IOException
      Triggered to signal the ability of the underlying request channel to accept a request messages. The data producer can choose to send a request message immediately inside the call or asynchronously at some later point.
      Parameters:
      channel - the request channel capable to accepting a request message.
      context - the actual execution context.
      Throws:
      HttpException
      IOException
    • consumeResponse

      void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context) throws HttpException, IOException
      Triggered to signal receipt of a response message head.
      Parameters:
      response - the response message head.
      entityDetails - the response entity details or null if the response does not enclose an entity.
      context - the actual execution context.
      Throws:
      HttpException
      IOException
    • consumeInformation

      void consumeInformation(HttpResponse response, HttpContext context) throws HttpException, IOException
      Triggered to signal receipt of an intermediate (1xx) HTTP response.
      Parameters:
      response - the intermediate (1xx) HTTP response.
      context - the actual execution context.
      Throws:
      HttpException
      IOException
    • cancel

      void cancel()
      Triggered to cancel the message exchange.