Class ProxyResponse

java.lang.Object
jakarta.servlet.ServletResponseWrapper
jakarta.servlet.http.HttpServletResponseWrapper
com.tremolosecurity.proxy.ProxyResponse
All Implemented Interfaces:
jakarta.servlet.http.HttpServletResponse, jakarta.servlet.ServletResponse

public class ProxyResponse extends jakarta.servlet.http.HttpServletResponseWrapper
  • Constructor Details

    • ProxyResponse

      public ProxyResponse(jakarta.servlet.http.HttpServletResponse resp, jakarta.servlet.http.HttpServletRequest req)
  • Method Details

    • flushBuffer

      public void flushBuffer() throws IOException
      Specified by:
      flushBuffer in interface jakarta.servlet.ServletResponse
      Overrides:
      flushBuffer in class jakarta.servlet.ServletResponseWrapper
      Throws:
      IOException
    • getBufferSize

      public int getBufferSize()
      Specified by:
      getBufferSize in interface jakarta.servlet.ServletResponse
      Overrides:
      getBufferSize in class jakarta.servlet.ServletResponseWrapper
    • getCharacterEncoding

      public String getCharacterEncoding()
      Specified by:
      getCharacterEncoding in interface jakarta.servlet.ServletResponse
      Overrides:
      getCharacterEncoding in class jakarta.servlet.ServletResponseWrapper
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface jakarta.servlet.ServletResponse
      Overrides:
      getContentType in class jakarta.servlet.ServletResponseWrapper
    • getLocale

      public Locale getLocale()
      Specified by:
      getLocale in interface jakarta.servlet.ServletResponse
      Overrides:
      getLocale in class jakarta.servlet.ServletResponseWrapper
    • getOutputStream

      public jakarta.servlet.ServletOutputStream getOutputStream() throws IOException
      Specified by:
      getOutputStream in interface jakarta.servlet.ServletResponse
      Overrides:
      getOutputStream in class jakarta.servlet.ServletResponseWrapper
      Throws:
      IOException
    • getWriter

      public PrintWriter getWriter() throws IOException
      Specified by:
      getWriter in interface jakarta.servlet.ServletResponse
      Overrides:
      getWriter in class jakarta.servlet.ServletResponseWrapper
      Throws:
      IOException
    • isCommitted

      public boolean isCommitted()
      Specified by:
      isCommitted in interface jakarta.servlet.ServletResponse
      Overrides:
      isCommitted in class jakarta.servlet.ServletResponseWrapper
    • reset

      public void reset()
      Specified by:
      reset in interface jakarta.servlet.ServletResponse
      Overrides:
      reset in class jakarta.servlet.ServletResponseWrapper
    • resetBuffer

      public void resetBuffer()
      Specified by:
      resetBuffer in interface jakarta.servlet.ServletResponse
      Overrides:
      resetBuffer in class jakarta.servlet.ServletResponseWrapper
    • setBufferSize

      public void setBufferSize(int size)
      Specified by:
      setBufferSize in interface jakarta.servlet.ServletResponse
      Overrides:
      setBufferSize in class jakarta.servlet.ServletResponseWrapper
    • setCharacterEncoding

      public void setCharacterEncoding(String encoding)
      Specified by:
      setCharacterEncoding in interface jakarta.servlet.ServletResponse
      Overrides:
      setCharacterEncoding in class jakarta.servlet.ServletResponseWrapper
    • setContentLength

      public void setContentLength(int size)
      Specified by:
      setContentLength in interface jakarta.servlet.ServletResponse
      Overrides:
      setContentLength in class jakarta.servlet.ServletResponseWrapper
    • setContentType

      public void setContentType(String contentType)
      Specified by:
      setContentType in interface jakarta.servlet.ServletResponse
      Overrides:
      setContentType in class jakarta.servlet.ServletResponseWrapper
    • setLocale

      public void setLocale(Locale locale)
      Specified by:
      setLocale in interface jakarta.servlet.ServletResponse
      Overrides:
      setLocale in class jakarta.servlet.ServletResponseWrapper
    • addCookie

      public void addCookie(jakarta.servlet.http.Cookie cookie)
      Specified by:
      addCookie in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      addCookie in class jakarta.servlet.http.HttpServletResponseWrapper
    • getCookies

      public ArrayList<jakarta.servlet.http.Cookie> getCookies()
    • addDateHeader

      public void addDateHeader(String name, long val)
      Specified by:
      addDateHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      addDateHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • addHeader

      public void addHeader(String name, String val)
      Specified by:
      addHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      addHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • addIntHeader

      public void addIntHeader(String name, int val)
      Specified by:
      addIntHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      addIntHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • containsHeader

      public boolean containsHeader(String name)
      Specified by:
      containsHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      containsHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • getUnisonHeader

      public Attribute getUnisonHeader(String name)
    • removeHeader

      public void removeHeader(String name)
    • pushHeadersAndCookies

      public void pushHeadersAndCookies(UrlHolder holder)
    • addCookieToResponse

      public static void addCookieToResponse(ApplicationType appConfig, StringBuilder cookieVal, org.joda.time.format.DateTimeFormatter expiresFormat, jakarta.servlet.http.Cookie cookie, jakarta.servlet.http.HttpServletResponse resp)
    • encodeRedirectURL

      public String encodeRedirectURL(String url)
      Specified by:
      encodeRedirectURL in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      encodeRedirectURL in class jakarta.servlet.http.HttpServletResponseWrapper
    • encodeRedirectUrl

      public String encodeRedirectUrl(String url)
    • encodeURL

      public String encodeURL(String url)
      Specified by:
      encodeURL in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      encodeURL in class jakarta.servlet.http.HttpServletResponseWrapper
    • encodeUrl

      public String encodeUrl(String url)
    • sendError

      public void sendError(int code) throws IOException
      Specified by:
      sendError in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      sendError in class jakarta.servlet.http.HttpServletResponseWrapper
      Throws:
      IOException
    • sendError

      public void sendError(int code, String status) throws IOException
      Specified by:
      sendError in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      sendError in class jakarta.servlet.http.HttpServletResponseWrapper
      Throws:
      IOException
    • sendRedirect

      public void sendRedirect(String url) throws IOException
      Specified by:
      sendRedirect in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      sendRedirect in class jakarta.servlet.http.HttpServletResponseWrapper
      Throws:
      IOException
    • setDateHeader

      public void setDateHeader(String name, long val)
      Specified by:
      setDateHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      setDateHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • setHeader

      public void setHeader(String name, String val)
      Specified by:
      setHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      setHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • setIntHeader

      public void setIntHeader(String name, int val)
      Specified by:
      setIntHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      setIntHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • setStatus

      public void setStatus(int status)
      Specified by:
      setStatus in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      setStatus in class jakarta.servlet.http.HttpServletResponseWrapper
    • addCookieToResponse

      public static void addCookieToResponse(UrlHolder holder, jakarta.servlet.http.Cookie sessionCookieName, jakarta.servlet.http.HttpServletResponse resp2)
    • addCookieToResponse

      public static void addCookieToResponse(ApplicationType appConfig, jakarta.servlet.http.Cookie sessionCookieName, jakarta.servlet.http.HttpServletResponse resp2)
    • getStatus

      public int getStatus()
      Specified by:
      getStatus in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      getStatus in class jakarta.servlet.http.HttpServletResponseWrapper
    • getHeader

      public String getHeader(String name)
      Specified by:
      getHeader in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      getHeader in class jakarta.servlet.http.HttpServletResponseWrapper
    • getHeaders

      public Collection<String> getHeaders(String name)
      Specified by:
      getHeaders in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      getHeaders in class jakarta.servlet.http.HttpServletResponseWrapper
    • getHeaderNames

      public Collection<String> getHeaderNames()
      Specified by:
      getHeaderNames in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      getHeaderNames in class jakarta.servlet.http.HttpServletResponseWrapper
    • setTrailerFields

      public void setTrailerFields(Supplier<Map<String,String>> supplier)
      Specified by:
      setTrailerFields in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      setTrailerFields in class jakarta.servlet.http.HttpServletResponseWrapper
    • getTrailerFields

      public Supplier<Map<String,String>> getTrailerFields()
      Specified by:
      getTrailerFields in interface jakarta.servlet.http.HttpServletResponse
      Overrides:
      getTrailerFields in class jakarta.servlet.http.HttpServletResponseWrapper