Interface Response

  • All Known Subinterfaces:
    ContentResponse
    All Known Implementing Classes:
    HttpContentResponse, HttpResponse

    @Deprecated(since="2021-05-27")
    public interface Response
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

    Response represents an HTTP response and offers methods to retrieve status code, HTTP version and headers.

    Response objects are passed as parameters to Response.Listener callbacks, or as future result of Request.send().

    Response objects do not contain getters for the response content, because it may be too large to fit into memory. The response content should be retrieved via content events, or via utility classes such as BufferingResponseListener.

    • Method Detail

      • getRequest

        Request getRequest()
        Deprecated.
        Returns:
        the request associated with this response
      • getVersion

        HttpVersion getVersion()
        Deprecated.
        Returns:
        the HTTP version of this response, such as "HTTP/1.1"
      • getStatus

        int getStatus()
        Deprecated.
        Returns:
        the HTTP status code of this response, such as 200 or 404
      • getReason

        java.lang.String getReason()
        Deprecated.
        Returns:
        the HTTP reason associated to the getStatus()
      • getHeaders

        HttpFields getHeaders()
        Deprecated.
        Returns:
        the headers of this response
      • abort

        boolean abort​(java.lang.Throwable cause)
        Deprecated.
        Attempts to abort the receive of this response.
        Parameters:
        cause - the abort cause, must not be null
        Returns:
        whether the abort succeeded