Interface HTTPResponse

  • All Known Implementing Classes:
    ApacheHTTPResponse

    interface HTTPResponse
    This class represents a complete HTTP response to a request made via a HTTPSender send request. Instances of this interface are intended to represent a deferred, future response, not necessarily a response which is immediately available.
    • Method Detail

      • abort

        void abort()
        Close out any resources still held by the original request. The conversation may need to be aborted if the session it was a part of gets abruptly terminated.
      • getHTTPStatus

        int getHTTPStatus()
                   throws java.lang.InterruptedException,
                          BOSHException
        Get the HTTP status code of the response (e.g., 200, 404, etc.). If the response has not yet been received from the remote server, this method should block until the response has arrived.
        Returns:
        HTTP status code
        Throws:
        java.lang.InterruptedException - if interrupted while awaiting response
        BOSHException
      • getBody

        AbstractBody getBody()
                      throws java.lang.InterruptedException,
                             BOSHException
        Get the HTTP response message body. If the response has not yet been received from the remote server, this method should block until the response has arrived.
        Returns:
        response message body
        Throws:
        java.lang.InterruptedException - if interrupted while awaiting response
        BOSHException