Class RemoteHttpServletResponse
- java.lang.Object
-
- org.forgerock.openam.authentication.service.protocol.RemoteServletResponse
-
- org.forgerock.openam.authentication.service.protocol.RemoteHttpServletResponse
-
- All Implemented Interfaces:
jakarta.servlet.http.HttpServletResponse,jakarta.servlet.ServletResponse,Serializable
public class RemoteHttpServletResponse extends RemoteServletResponse implements jakarta.servlet.http.HttpServletResponse, Serializable
Encapsulates a HttpServletResponse and makes that state that is serializable transferable.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID-
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_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_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_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY
-
-
Constructor Summary
Constructors Constructor Description RemoteHttpServletResponse()Used by deserialization.RemoteHttpServletResponse(jakarta.servlet.http.HttpServletResponse response)Creates a new RemoteHttpServletResponse encapsulating a normal response
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCookie(jakarta.servlet.http.Cookie cookie)The default behavior of this method is to call addCookie(Cookie cookie) on the wrapped response object.voidaddDateHeader(String name, long date)The default behavior of this method is to call addDateHeader(String name, long date) on the wrapped response object.voidaddHeader(String name, String value)The default behavior of this method is to return addHeader(String name, String value) on the wrapped response object.voidaddIntHeader(String name, int value)The default behavior of this method is to call addIntHeader(String name, int value) on the wrapped response object.booleancontainsHeader(String name)The default behavior of this method is to call containsHeader(String name) on the wrapped response object.StringencodeRedirectUrl(String url)The default behavior of this method is to return encodeRedirectUrl(String url) on the wrapped response object.StringencodeRedirectURL(String url)The default behavior of this method is to return encodeRedirectURL(String url) on the wrapped response object.StringencodeUrl(String url)The default behavior of this method is to call encodeUrl(String url) on the wrapped response object.StringencodeURL(String url)The default behavior of this method is to call encodeURL(String url) on the wrapped response object.Set<RemoteCookie>getCookies()Returns the cookies associated with the request.Map<String,Set<Long>>getDateHeaders()The Map of set date headers.StringgetHeader(String s)Collection<String>getHeaderNames()Map<String,List<String>>getHeaders()The Map of the set headers.Collection<String>getHeaders(String s)intgetStatus()voidsendError(int sc)The default behavior of this method is to call sendError(int sc) on the wrapped response object.voidsendError(int sc, String msg)The default behavior of this method is to call sendError(int sc, String msg) on the wrapped response object.voidsendRedirect(String location)The default behavior of this method is to return sendRedirect(String location) on the wrapped response object.voidsetDateHeader(String name, long date)The default behavior of this method is to call setDateHeader(String name, long date) on the wrapped response object.voidsetHeader(String name, String value)The default behavior of this method is to return setHeader(String name, String value) on the wrapped response object.voidsetIntHeader(String name, int value)The default behavior of this method is to call setIntHeader(String name, int value) on the wrapped response object.voidsetStatus(int sc)The default behavior of this method is to call setStatus(int sc) on the wrapped response object.voidsetStatus(int sc, String sm)The default behavior of this method is to call setStatus(int sc, String sm) on the wrapped response object.-
Methods inherited from class org.forgerock.openam.authentication.service.protocol.RemoteServletResponse
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getResponse, getWriter, isCommitted, processResponse, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentLengthLong, setContentType, setLocale, 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.http.HttpServletResponse
getTrailerFields, setTrailerFields
-
Methods inherited from interface jakarta.servlet.ServletResponse
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentLengthLong, setContentType, setLocale
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemoteHttpServletResponse
public RemoteHttpServletResponse(jakarta.servlet.http.HttpServletResponse response)
Creates a new RemoteHttpServletResponse encapsulating a normal response- Parameters:
response- The response to be encapsulated.
-
RemoteHttpServletResponse
public RemoteHttpServletResponse()
Used by deserialization.
-
-
Method Detail
-
addCookie
public void addCookie(jakarta.servlet.http.Cookie cookie)
The default behavior of this method is to call addCookie(Cookie cookie) on the wrapped response object. Serialized. Updates the underlying response if available.- Specified by:
addCookiein interfacejakarta.servlet.http.HttpServletResponse- Parameters:
cookie- The cookie to add to the request.
-
getCookies
public Set<RemoteCookie> getCookies()
Returns the cookies associated with the request. Serialized.- Returns:
- A Set containing the cookies.
-
containsHeader
public boolean containsHeader(String name)
The default behavior of this method is to call containsHeader(String name) on the wrapped response object. Serialized.- Specified by:
containsHeaderin interfacejakarta.servlet.http.HttpServletResponse- Returns:
- true if the header is set, false otherwise.
-
encodeURL
public String encodeURL(String url)
The default behavior of this method is to call encodeURL(String url) on the wrapped response object. Not Serialized.- Specified by:
encodeURLin interfacejakarta.servlet.http.HttpServletResponse- Returns:
- The encoded URL, null if not available.
-
encodeRedirectURL
public String encodeRedirectURL(String url)
The default behavior of this method is to return encodeRedirectURL(String url) on the wrapped response object. Not serialized.- Specified by:
encodeRedirectURLin interfacejakarta.servlet.http.HttpServletResponse- Returns:
- Encoded redirect URL, null if not available.
-
encodeUrl
public String encodeUrl(String url)
The default behavior of this method is to call encodeUrl(String url) on the wrapped response object. Not Serialized.- Specified by:
encodeUrlin interfacejakarta.servlet.http.HttpServletResponse- Returns:
- The encoded URL, null if unavailable.
-
encodeRedirectUrl
public String encodeRedirectUrl(String url)
The default behavior of this method is to return encodeRedirectUrl(String url) on the wrapped response object. Not Serialized.- Specified by:
encodeRedirectUrlin interfacejakarta.servlet.http.HttpServletResponse- Returns:
- The encoded redirect URL, null if not available.
-
sendError
public void sendError(int sc, String msg) throws IOExceptionThe default behavior of this method is to call sendError(int sc, String msg) on the wrapped response object. Not serialized.- Specified by:
sendErrorin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
sc- The error codemsg- The error message- Throws:
IOException- If the error code cannot be set.
-
sendError
public void sendError(int sc) throws IOExceptionThe default behavior of this method is to call sendError(int sc) on the wrapped response object. Not serialized.- Specified by:
sendErrorin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
sc- The error code- Throws:
IOException- If the error code cannot be set.
-
sendRedirect
public void sendRedirect(String location) throws IOException
The default behavior of this method is to return sendRedirect(String location) on the wrapped response object. Not serialized.- Specified by:
sendRedirectin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
location- The location of the 302 redirect.- Throws:
IOException- If the redirect cannot be set.
-
setDateHeader
public void setDateHeader(String name, long date)
The default behavior of this method is to call setDateHeader(String name, long date) on the wrapped response object. Serialized.- Specified by:
setDateHeaderin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
name- The name of the date headerdate- The date expressed in seconds.
-
addDateHeader
public void addDateHeader(String name, long date)
The default behavior of this method is to call addDateHeader(String name, long date) on the wrapped response object. Serialized.- Specified by:
addDateHeaderin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
name- The name of the date header to adddate- The value of the date expressed in seconds.
-
getDateHeaders
public Map<String,Set<Long>> getDateHeaders()
The Map of set date headers. Serialized.- Returns:
- The Map of date headers.
-
setHeader
public void setHeader(String name, String value)
The default behavior of this method is to return setHeader(String name, String value) on the wrapped response object. Serialized.- Specified by:
setHeaderin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
name- The name of the headervalue- The value of the header
-
addHeader
public void addHeader(String name, String value)
The default behavior of this method is to return addHeader(String name, String value) on the wrapped response object. Serialized.- Specified by:
addHeaderin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
name- The name of the headervalue- The value of the header
-
getHeaders
public Map<String,List<String>> getHeaders()
The Map of the set headers. Serialized.- Returns:
- Map of set headers.
-
setIntHeader
public void setIntHeader(String name, int value)
The default behavior of this method is to call setIntHeader(String name, int value) on the wrapped response object. Serialized.- Specified by:
setIntHeaderin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
name- The name of the headervalue- The value of the header
-
addIntHeader
public void addIntHeader(String name, int value)
The default behavior of this method is to call addIntHeader(String name, int value) on the wrapped response object. Serialized.- Specified by:
addIntHeaderin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
name- The name of the headervalue- The value of the header
-
setStatus
public void setStatus(int sc)
The default behavior of this method is to call setStatus(int sc) on the wrapped response object. Not Serialized.- Specified by:
setStatusin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
sc- The status code of the response
-
setStatus
public void setStatus(int sc, String sm)The default behavior of this method is to call setStatus(int sc, String sm) on the wrapped response object. Not Serialized.- Specified by:
setStatusin interfacejakarta.servlet.http.HttpServletResponse- Parameters:
sc- The status code of the response
-
getStatus
public int getStatus()
- Specified by:
getStatusin interfacejakarta.servlet.http.HttpServletResponse
-
getHeader
public String getHeader(String s)
- Specified by:
getHeaderin interfacejakarta.servlet.http.HttpServletResponse
-
getHeaders
public Collection<String> getHeaders(String s)
- Specified by:
getHeadersin interfacejakarta.servlet.http.HttpServletResponse
-
getHeaderNames
public Collection<String> getHeaderNames()
- Specified by:
getHeaderNamesin interfacejakarta.servlet.http.HttpServletResponse
-
-