Interface ResponseChannel


@Contract(threading=SAFE) public interface ResponseChannel
Abstract response / response promise channel.

Implementations are expected to be thread-safe.

Since:
5.0
  • Method Details

    • sendInformation

      void sendInformation(HttpResponse response, HttpContext context) throws HttpException, IOException
      Sends an intermediate informational HTTP response through this channel.
      Parameters:
      response - an intermediate (1xx) HTTP response.
      context - the actual execution context.
      Throws:
      HttpException - in case of an HTTP protocol violation.
      IOException - in case of an I/O error.
    • sendResponse

      void sendResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context) throws HttpException, IOException
      Sends a final HTTP response through this channel.
      Parameters:
      response - a final (non 1xx) HTTP response
      entityDetails - the response entity details or null if the response does not enclose an entity.
      context - the actual execution context.
      Throws:
      HttpException - in case of an HTTP protocol violation.
      IOException - in case of an I/O error.
    • pushPromise

      void pushPromise(HttpRequest promise, AsyncPushProducer responseProducer, HttpContext context) throws HttpException, IOException
      Pushes a request message head through this channel as a promise to deliver a response message.
      Parameters:
      promise - the request message header used as a promise.
      responseProducer - the push response message producer.
      context - the actual execution context.
      Throws:
      HttpException - in case of an HTTP protocol violation.
      IOException - in case of an I/O error.
    • terminateExchange

      @Internal default void terminateExchange()
      Terminates message exchange due to an internal error generating a response or its content.