Class HTTPExchange

java.lang.Object
org.igniterealtime.jbosh.HTTPExchange

final class HTTPExchange extends Object
A request and response pair representing a single exchange with a remote content manager. This is primarily a container class intended to maintain the relationship between the request and response but allows the response to be added after the fact.
  • Field Details

    • LOG

      private static final Logger LOG
      Logger.
    • request

      private final AbstractBody request
      Request body.
    • lock

      private final Lock lock
      Lock instance used to protect and provide conditions.
    • ready

      private final Condition ready
      Condition used to signal when the response has been set.
    • response

      private HTTPResponse response
      HTTPResponse instance.
  • Constructor Details

    • HTTPExchange

      HTTPExchange(AbstractBody req)
      Create a new request/response pair object.
      Parameters:
      req - request message body
  • Method Details

    • getRequest

      AbstractBody getRequest()
      Get the original request message.
      Returns:
      request message body.
    • setHTTPResponse

      void setHTTPResponse(HTTPResponse resp)
      Set the HTTPResponse instance.
    • getHTTPResponse

      HTTPResponse getHTTPResponse()
      Get the HTTPResponse instance.
      Returns:
      HTTPResponse instance associated with the request.