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
-
Field Summary
Fields inherited from interface jakarta.servlet.http.HttpServletResponse
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MISDIRECTED_REQUEST, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PERMANENT_REDIRECT, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNPROCESSABLE_CONTENT, SC_UNSUPPORTED_MEDIA_TYPE, SC_UPGRADE_REQUIRED, SC_USE_PROXY
-
Constructor Summary
ConstructorDescriptionProxyResponse
(jakarta.servlet.http.HttpServletResponse resp, jakarta.servlet.http.HttpServletRequest req) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCookie
(jakarta.servlet.http.Cookie cookie) static void
addCookieToResponse
(UrlHolder holder, jakarta.servlet.http.Cookie sessionCookieName, jakarta.servlet.http.HttpServletResponse resp2) static void
addCookieToResponse
(ApplicationType appConfig, jakarta.servlet.http.Cookie sessionCookieName, jakarta.servlet.http.HttpServletResponse resp2) static void
addCookieToResponse
(ApplicationType appConfig, StringBuilder cookieVal, org.joda.time.format.DateTimeFormatter expiresFormat, jakarta.servlet.http.Cookie cookie, jakarta.servlet.http.HttpServletResponse resp) void
addDateHeader
(String name, long val) void
void
addIntHeader
(String name, int val) boolean
containsHeader
(String name) encodeRedirectUrl
(String url) encodeRedirectURL
(String url) void
int
ArrayList
<jakarta.servlet.http.Cookie> getHeaders
(String name) jakarta.servlet.ServletOutputStream
int
getUnisonHeader
(String name) boolean
void
pushHeadersAndCookies
(UrlHolder holder) void
removeHeader
(String name) void
reset()
void
void
sendError
(int code) void
void
sendRedirect
(String url) void
setBufferSize
(int size) void
setCharacterEncoding
(String encoding) void
setContentLength
(int size) void
setContentType
(String contentType) void
setDateHeader
(String name, long val) void
void
setIntHeader
(String name, int val) void
void
setStatus
(int status) void
setTrailerFields
(Supplier<Map<String, String>> supplier) Methods inherited from class jakarta.servlet.http.HttpServletResponseWrapper
sendRedirect, sendRedirect, sendRedirect
Methods inherited from class jakarta.servlet.ServletResponseWrapper
getResponse, isWrapperFor, isWrapperFor, setCharacterEncoding, setContentLengthLong, setResponse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.servlet.ServletResponse
setCharacterEncoding, setContentLengthLong
-
Constructor Details
-
ProxyResponse
public ProxyResponse(jakarta.servlet.http.HttpServletResponse resp, jakarta.servlet.http.HttpServletRequest req)
-
-
Method Details
-
flushBuffer
- Specified by:
flushBuffer
in interfacejakarta.servlet.ServletResponse
- Overrides:
flushBuffer
in classjakarta.servlet.ServletResponseWrapper
- Throws:
IOException
-
getBufferSize
public int getBufferSize()- Specified by:
getBufferSize
in interfacejakarta.servlet.ServletResponse
- Overrides:
getBufferSize
in classjakarta.servlet.ServletResponseWrapper
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfacejakarta.servlet.ServletResponse
- Overrides:
getCharacterEncoding
in classjakarta.servlet.ServletResponseWrapper
-
getContentType
- Specified by:
getContentType
in interfacejakarta.servlet.ServletResponse
- Overrides:
getContentType
in classjakarta.servlet.ServletResponseWrapper
-
getLocale
- Specified by:
getLocale
in interfacejakarta.servlet.ServletResponse
- Overrides:
getLocale
in classjakarta.servlet.ServletResponseWrapper
-
getOutputStream
- Specified by:
getOutputStream
in interfacejakarta.servlet.ServletResponse
- Overrides:
getOutputStream
in classjakarta.servlet.ServletResponseWrapper
- Throws:
IOException
-
getWriter
- Specified by:
getWriter
in interfacejakarta.servlet.ServletResponse
- Overrides:
getWriter
in classjakarta.servlet.ServletResponseWrapper
- Throws:
IOException
-
isCommitted
public boolean isCommitted()- Specified by:
isCommitted
in interfacejakarta.servlet.ServletResponse
- Overrides:
isCommitted
in classjakarta.servlet.ServletResponseWrapper
-
reset
public void reset()- Specified by:
reset
in interfacejakarta.servlet.ServletResponse
- Overrides:
reset
in classjakarta.servlet.ServletResponseWrapper
-
resetBuffer
public void resetBuffer()- Specified by:
resetBuffer
in interfacejakarta.servlet.ServletResponse
- Overrides:
resetBuffer
in classjakarta.servlet.ServletResponseWrapper
-
setBufferSize
public void setBufferSize(int size) - Specified by:
setBufferSize
in interfacejakarta.servlet.ServletResponse
- Overrides:
setBufferSize
in classjakarta.servlet.ServletResponseWrapper
-
setCharacterEncoding
- Specified by:
setCharacterEncoding
in interfacejakarta.servlet.ServletResponse
- Overrides:
setCharacterEncoding
in classjakarta.servlet.ServletResponseWrapper
-
setContentLength
public void setContentLength(int size) - Specified by:
setContentLength
in interfacejakarta.servlet.ServletResponse
- Overrides:
setContentLength
in classjakarta.servlet.ServletResponseWrapper
-
setContentType
- Specified by:
setContentType
in interfacejakarta.servlet.ServletResponse
- Overrides:
setContentType
in classjakarta.servlet.ServletResponseWrapper
-
setLocale
- Specified by:
setLocale
in interfacejakarta.servlet.ServletResponse
- Overrides:
setLocale
in classjakarta.servlet.ServletResponseWrapper
-
addCookie
public void addCookie(jakarta.servlet.http.Cookie cookie) - Specified by:
addCookie
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
addCookie
in classjakarta.servlet.http.HttpServletResponseWrapper
-
getCookies
-
addDateHeader
- Specified by:
addDateHeader
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
addDateHeader
in classjakarta.servlet.http.HttpServletResponseWrapper
-
addHeader
-
addIntHeader
- Specified by:
addIntHeader
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
addIntHeader
in classjakarta.servlet.http.HttpServletResponseWrapper
-
containsHeader
- Specified by:
containsHeader
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
containsHeader
in classjakarta.servlet.http.HttpServletResponseWrapper
-
getUnisonHeader
-
removeHeader
-
pushHeadersAndCookies
-
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
-
encodeRedirectUrl
-
encodeURL
-
encodeUrl
-
sendError
- Specified by:
sendError
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
sendError
in classjakarta.servlet.http.HttpServletResponseWrapper
- Throws:
IOException
-
sendError
- Specified by:
sendError
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
sendError
in classjakarta.servlet.http.HttpServletResponseWrapper
- Throws:
IOException
-
sendRedirect
- Specified by:
sendRedirect
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
sendRedirect
in classjakarta.servlet.http.HttpServletResponseWrapper
- Throws:
IOException
-
setDateHeader
- Specified by:
setDateHeader
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
setDateHeader
in classjakarta.servlet.http.HttpServletResponseWrapper
-
setHeader
-
setIntHeader
- Specified by:
setIntHeader
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
setIntHeader
in classjakarta.servlet.http.HttpServletResponseWrapper
-
setStatus
public void setStatus(int status) - Specified by:
setStatus
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
setStatus
in classjakarta.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 interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
getStatus
in classjakarta.servlet.http.HttpServletResponseWrapper
-
getHeader
-
getHeaders
- Specified by:
getHeaders
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
getHeaders
in classjakarta.servlet.http.HttpServletResponseWrapper
-
getHeaderNames
- Specified by:
getHeaderNames
in interfacejakarta.servlet.http.HttpServletResponse
- Overrides:
getHeaderNames
in classjakarta.servlet.http.HttpServletResponseWrapper
-
setTrailerFields
-
getTrailerFields
-