Interface HttpResponse

  • All Superinterfaces:
    Response
    All Known Implementing Classes:
    DummyResponse, HttpResponseWrapper, PECoyoteResponse, Response

    public interface HttpResponse
    extends Response
    An HttpResponse is the Catalina-internal facade for an HttpServletResponse that is to be produced, based on the processing of a corresponding HttpRequest.
    Version:
    $Revision: 1.2 $ $Date: 2005/12/08 01:27:16 $
    Author:
    Craig R. McClanahan
    • Method Detail

      • getHeader

        String getHeader​(String name)
        Return the value for the specified header, or null if this header has not been set. If more than one value was added for this name, only the first is returned; use getHeaders(String) to retrieve all of them.
        Parameters:
        name - Header name to look up
      • getHeaderNames

        Collection<String> getHeaderNames()
        Returns:
        a (possibly empty) Collection of the names of the headers of this response
      • getHeaders

        Collection<String> getHeaders​(String name)
        Parameters:
        name - the name of the response header whose values to return
        Returns:
        a (possibly empty) Collection of the values of the response header with the given name
      • addSessionCookieInternal

        void addSessionCookieInternal​(jakarta.servlet.http.Cookie cookie)
        Special method for adding a session cookie as we should be overriding any previous
        Parameters:
        cookie -
      • getMessage

        String getMessage()
        Return the error message that was set with sendError() for this Response.
      • getStatus

        int getStatus()
        Return the HTTP status code associated with this Response.
      • reset

        void reset​(int status,
                   String message)
        Reset this response, and specify the values for the HTTP status code and corresponding message.
        Throws:
        IllegalStateException - if this response has already been committed
      • sendAcknowledgement

        void sendAcknowledgement()
                          throws IOException
        Send an acknowledgment of a request. An acknowledgment in this case is simply an HTTP response status line, i.e. HTTP/1.1 [STATUS] [REASON-PHRASE].
        Specified by:
        sendAcknowledgement in interface Response
        Throws:
        IOException - if an input/output error occurs