Interface AsyncRequestConsumer<T>

Type Parameters:
T - request representation.
All Superinterfaces:
AsyncDataConsumer, ResourceHolder
All Known Implementing Classes:
AbstractAsyncRequesterConsumer, BasicRequestConsumer

public interface AsyncRequestConsumer<T> extends AsyncDataConsumer
Abstract asynchronous request consumer.
Since:
5.0
  • Method Details

    • consumeRequest

      void consumeRequest(HttpRequest request, EntityDetails entityDetails, HttpContext context, FutureCallback<T> resultCallback) throws HttpException, IOException
      Triggered to signal receipt of a request message head.
      Parameters:
      request - the request message head.
      entityDetails - the request entity details or null if the request does not enclose an entity.
      context - the actual execution context.
      resultCallback - the result callback called when request processing has been completed successfully or unsuccessfully.
      Throws:
      HttpException
      IOException
    • failed

      void failed(Exception cause)
      Triggered to signal a failure in data processing.
      Parameters:
      cause - the cause of the failure.