Class ResponseImpl

java.lang.Object
google.registry.request.ResponseImpl
All Implemented Interfaces:
Response

public final class ResponseImpl extends Object implements Response
HTTP response object.
  • Constructor Details

    • ResponseImpl

      @Inject public ResponseImpl(jakarta.servlet.http.HttpServletResponse rsp)
  • Method Details

    • sendRedirect

      public void sendRedirect(String url) throws IOException
      Specified by:
      sendRedirect in interface Response
      Throws:
      IOException
    • setStatus

      public void setStatus(int status)
      Description copied from interface: Response
      Sets the HTTP status code.
      Specified by:
      setStatus in interface Response
    • setContentType

      public void setContentType(com.google.common.net.MediaType contentType)
      Description copied from interface: Response
      Sets the HTTP Content-Type and possibly encoding.
      Specified by:
      setContentType in interface Response
    • setPayload

      public void setPayload(String payload)
      Description copied from interface: Response
      Writes the HTTP payload.
      Specified by:
      setPayload in interface Response
    • setHeader

      public void setHeader(String header, String value)
      Description copied from interface: Response
      Writes an HTTP header to the response.
      Specified by:
      setHeader in interface Response
      See Also:
      • HttpServletResponse.setHeader(String, String)
    • setDateHeader

      public void setDateHeader(String header, org.joda.time.DateTime timestamp)
      Description copied from interface: Response
      Writes an HTTP header with a timestamp value.
      Specified by:
      setDateHeader in interface Response
      See Also:
      • HttpServletResponse.setDateHeader(String, long)
    • addCookie

      public void addCookie(jakarta.servlet.http.Cookie cookie)
      Description copied from interface: Response
      Adds a cookie to the response
      Specified by:
      addCookie in interface Response
      See Also:
      • HttpServletResponse.addCookie(Cookie)
    • getWriter

      public PrintWriter getWriter() throws IOException
      Specified by:
      getWriter in interface Response
      Throws:
      IOException