Class RemoteServletResponse

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      RemoteServletResponse()
      Used by deserialization.
      RemoteServletResponse​(jakarta.servlet.ServletResponse response)
      Creates a ServletResponse adaptor wrapping the given response object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void flushBuffer()
      The default behavior of this method is to call flushBuffer() on the wrapped response object.
      int getBufferSize()
      The default behavior of this method is to return getBufferSize() on the wrapped response object.
      String getCharacterEncoding()
      The default behavior of this method is to return getCharacterEncoding() on the wrapped response object.
      String getContentType()
      Returns the MIME type for the content response
      Locale getLocale()
      The default behavior of this method is to return getLocale() on the wrapped response object.
      jakarta.servlet.ServletOutputStream getOutputStream()
      The default behavior of this method is to return getOutputStream() on the wrapped response object.
      jakarta.servlet.ServletResponse getResponse()
      Return the wrapped ServletResponse object.
      PrintWriter getWriter()
      The default behavior of this method is to return getWriter() on the wrapped response object.
      boolean isCommitted()
      The default behavior of this method is to return isCommitted() on the wrapped response object.
      protected void processResponse()  
      void reset()
      The default behavior of this method is to call reset() on the wrapped response object.
      void resetBuffer()
      The default behavior of this method is to call resetBuffer() on the wrapped response object.
      void setBufferSize​(int size)
      The default behavior of this method is to call setBufferSize(int size) on the wrapped response object.
      void setCharacterEncoding​(String charSet)
      Sets the character encoding of the response
      void setContentLength​(int len)
      The default behavior of this method is to call setContentLength(int len) on the wrapped response object.
      void setContentLengthLong​(long len)  
      void setContentType​(String type)
      The default behavior of this method is to call setContentType(String type) on the wrapped response object.
      void setLocale​(Locale loc)
      The default behavior of this method is to call setLocale(Locale loc) on the wrapped response object.
      void setResponse​(jakarta.servlet.ServletResponse response)
      Sets the response being wrapped.
    • Constructor Detail

      • RemoteServletResponse

        public RemoteServletResponse​(jakarta.servlet.ServletResponse response)
        Creates a ServletResponse adaptor wrapping the given response object.
        Parameters:
        response - The response to wrap.
        Throws:
        IllegalArgumentException - if the response is null.
      • RemoteServletResponse

        public RemoteServletResponse()
        Used by deserialization.
    • Method Detail

      • processResponse

        protected void processResponse()
      • getResponse

        public jakarta.servlet.ServletResponse getResponse()
        Return the wrapped ServletResponse object.
        Returns:
        The encapsulated response object.
      • setResponse

        public void setResponse​(jakarta.servlet.ServletResponse response)
        Sets the response being wrapped.
        Throws:
        IllegalArgumentException - if the response is null.
      • getCharacterEncoding

        public String getCharacterEncoding()
        The default behavior of this method is to return getCharacterEncoding() on the wrapped response object. Serialized.
        Specified by:
        getCharacterEncoding in interface jakarta.servlet.ServletResponse
        Returns:
        The character encoding of the response.
      • getContentType

        public String getContentType()
        Returns the MIME type for the content response
        Specified by:
        getContentType in interface jakarta.servlet.ServletResponse
        Returns:
        MIME type of the content response
        Since:
        2.4
      • getOutputStream

        public jakarta.servlet.ServletOutputStream getOutputStream()
                                                            throws IOException
        The default behavior of this method is to return getOutputStream() on the wrapped response object. Not serialized.
        Specified by:
        getOutputStream in interface jakarta.servlet.ServletResponse
        Returns:
        The output stream associated with the response, null if unavailable.
        Throws:
        IOException
      • getWriter

        public PrintWriter getWriter()
                              throws IOException
        The default behavior of this method is to return getWriter() on the wrapped response object. Not serialized.
        Specified by:
        getWriter in interface jakarta.servlet.ServletResponse
        Returns:
        The writer associated with the response, null if unavailable.
        Throws:
        IOException
      • setContentLength

        public void setContentLength​(int len)
        The default behavior of this method is to call setContentLength(int len) on the wrapped response object. Not serialized.
        Specified by:
        setContentLength in interface jakarta.servlet.ServletResponse
        Parameters:
        len - The new content length of the response.
      • setContentLengthLong

        public void setContentLengthLong​(long len)
        Specified by:
        setContentLengthLong in interface jakarta.servlet.ServletResponse
      • setContentType

        public void setContentType​(String type)
        The default behavior of this method is to call setContentType(String type) on the wrapped response object. Not Serialized.
        Specified by:
        setContentType in interface jakarta.servlet.ServletResponse
        Parameters:
        type - The new content type of the response.
      • setBufferSize

        public void setBufferSize​(int size)
        The default behavior of this method is to call setBufferSize(int size) on the wrapped response object. Not serailzed.
        Specified by:
        setBufferSize in interface jakarta.servlet.ServletResponse
        Parameters:
        size - The new buffer size of the request.
      • getBufferSize

        public int getBufferSize()
        The default behavior of this method is to return getBufferSize() on the wrapped response object. Not serialized.
        Specified by:
        getBufferSize in interface jakarta.servlet.ServletResponse
        Returns:
        The buffer size of the response, -1 if unavailable.
      • flushBuffer

        public void flushBuffer()
                         throws IOException
        The default behavior of this method is to call flushBuffer() on the wrapped response object. Not serialized.
        Specified by:
        flushBuffer in interface jakarta.servlet.ServletResponse
        Throws:
        IOException
      • isCommitted

        public boolean isCommitted()
        The default behavior of this method is to return isCommitted() on the wrapped response object. Not serialized.
        Specified by:
        isCommitted in interface jakarta.servlet.ServletResponse
        Returns:
        True if the response has been committed, false otherwise.
      • reset

        public void reset()
        The default behavior of this method is to call reset() on the wrapped response object. Not serialized.
        Specified by:
        reset in interface jakarta.servlet.ServletResponse
      • resetBuffer

        public void resetBuffer()
        The default behavior of this method is to call resetBuffer() on the wrapped response object. Not serialized.
        Specified by:
        resetBuffer in interface jakarta.servlet.ServletResponse
      • setLocale

        public void setLocale​(Locale loc)
        The default behavior of this method is to call setLocale(Locale loc) on the wrapped response object. Serialized.
        Specified by:
        setLocale in interface jakarta.servlet.ServletResponse
        Parameters:
        loc - Sets the new locale of the response.
      • setCharacterEncoding

        public void setCharacterEncoding​(String charSet)
        Sets the character encoding of the response
        Specified by:
        setCharacterEncoding in interface jakarta.servlet.ServletResponse
        Parameters:
        charSet - Sets the new charSet of the response.
        Since:
        2.4
      • getLocale

        public Locale getLocale()
        The default behavior of this method is to return getLocale() on the wrapped response object. Serialized.
        Specified by:
        getLocale in interface jakarta.servlet.ServletResponse
        Returns:
        The locale of the response