Class ApplicationResponse

  • All Implemented Interfaces:
    jakarta.servlet.ServletResponse

    public class ApplicationResponse
    extends jakarta.servlet.ServletResponseWrapper
    START OF PWC 4858179 class ApplicationResponse extends ServletResponseWrapper {
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean included
      Is this wrapped response the subject of an include() call?
    • Constructor Summary

      Constructors 
      Constructor Description
      ApplicationResponse​(jakarta.servlet.ServletResponse response)
      Construct a new wrapped response around the specified servlet response.
      ApplicationResponse​(jakarta.servlet.ServletResponse response, boolean included)
      Construct a new wrapped response around the specified servlet response.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isIncluded()
      Return the included flag for this response.
      void reset()
      Disallow reset() calls on a included response.
      void setBufferSize​(int size)
      Ignore setBufferSize() calls on an included response.
      void setContentLength​(int len)
      Disallow setContentLength() calls on an included response.
      void setContentType​(String type)
      Disallow setContentType() calls on an included response.
      void setLocale​(Locale loc)
      Ignore setLocale() calls on an included response.
      void setResponse​(jakarta.servlet.ServletResponse response)
      Set the response that we are wrapping.
      • Methods inherited from class jakarta.servlet.ServletResponseWrapper

        flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getResponse, getWriter, isCommitted, isWrapperFor, isWrapperFor, resetBuffer, setCharacterEncoding, setContentLengthLong
    • Field Detail

      • included

        protected boolean included
        Is this wrapped response the subject of an include() call?
    • Constructor Detail

      • ApplicationResponse

        public ApplicationResponse​(jakarta.servlet.ServletResponse response)
        Construct a new wrapped response around the specified servlet response.
        Parameters:
        response - The servlet response being wrapped
      • ApplicationResponse

        public ApplicationResponse​(jakarta.servlet.ServletResponse response,
                                   boolean included)
        Construct a new wrapped response around the specified servlet response.
        Parameters:
        response - The servlet response being wrapped
        included - true if this response is being processed by a RequestDispatcher.include() call
    • Method Detail

      • reset

        public void reset()
        Disallow reset() calls on a included response.
        Specified by:
        reset in interface jakarta.servlet.ServletResponse
        Overrides:
        reset in class jakarta.servlet.ServletResponseWrapper
        Throws:
        IllegalStateException - if the response has already been committed
      • setContentLength

        public void setContentLength​(int len)
        Disallow setContentLength() calls on an included response.
        Specified by:
        setContentLength in interface jakarta.servlet.ServletResponse
        Overrides:
        setContentLength in class jakarta.servlet.ServletResponseWrapper
        Parameters:
        len - The new content length
      • setContentType

        public void setContentType​(String type)
        Disallow setContentType() calls on an included response.
        Specified by:
        setContentType in interface jakarta.servlet.ServletResponse
        Overrides:
        setContentType in class jakarta.servlet.ServletResponseWrapper
        Parameters:
        type - The new content type
      • setLocale

        public void setLocale​(Locale loc)
        Ignore setLocale() calls on an included response.
        Specified by:
        setLocale in interface jakarta.servlet.ServletResponse
        Overrides:
        setLocale in class jakarta.servlet.ServletResponseWrapper
        Parameters:
        loc - The new locale
      • setBufferSize

        public void setBufferSize​(int size)
        Ignore setBufferSize() calls on an included response.
        Specified by:
        setBufferSize in interface jakarta.servlet.ServletResponse
        Overrides:
        setBufferSize in class jakarta.servlet.ServletResponseWrapper
        Parameters:
        size - The buffer size
      • setResponse

        public void setResponse​(jakarta.servlet.ServletResponse response)
        Set the response that we are wrapping.
        Overrides:
        setResponse in class jakarta.servlet.ServletResponseWrapper
        Parameters:
        response - The new wrapped response
      • isIncluded

        public boolean isIncluded()
        Return the included flag for this response.