Interface Response

  • All Known Implementing Classes:
    ResponseImpl

    public interface Response
    HTTP request response object.
    See Also:
    ResponseImpl
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void setContentType​(com.google.common.net.MediaType contentType)
      Sets the HTTP Content-Type and possibly encoding.
      void setDateHeader​(java.lang.String header, org.joda.time.DateTime timestamp)
      Writes an HTTP header with a timestamp value.
      void setHeader​(java.lang.String header, java.lang.String value)
      Writes an HTTP header to the response.
      void setPayload​(java.lang.String payload)
      Writes the HTTP payload.
      void setStatus​(int status)
      Sets the HTTP status code.
    • Method Detail

      • setStatus

        void setStatus​(int status)
        Sets the HTTP status code.
      • setContentType

        void setContentType​(com.google.common.net.MediaType contentType)
        Sets the HTTP Content-Type and possibly encoding.
      • setPayload

        void setPayload​(java.lang.String payload)
        Writes the HTTP payload.
        Throws:
        java.lang.IllegalStateException - if you've already written the payload
      • setHeader

        void setHeader​(java.lang.String header,
                       java.lang.String value)
        Writes an HTTP header to the response.
        See Also:
        HttpServletResponse.setHeader(String, String)
      • setDateHeader

        void setDateHeader​(java.lang.String header,
                           org.joda.time.DateTime timestamp)
        Writes an HTTP header with a timestamp value.
        See Also:
        HttpServletResponse.setDateHeader(String, long)