Class RemoteServletResponse
- java.lang.Object
-
- org.forgerock.openam.authentication.service.protocol.RemoteServletResponse
-
- All Implemented Interfaces:
jakarta.servlet.ServletResponse,Serializable
- Direct Known Subclasses:
RemoteHttpServletResponse
public class RemoteServletResponse extends Object implements jakarta.servlet.ServletResponse, Serializable
Encapsulates the transferable state of a ServletResponse object.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID
-
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 voidflushBuffer()The default behavior of this method is to call flushBuffer() on the wrapped response object.intgetBufferSize()The default behavior of this method is to return getBufferSize() on the wrapped response object.StringgetCharacterEncoding()The default behavior of this method is to return getCharacterEncoding() on the wrapped response object.StringgetContentType()Returns the MIME type for the content responseLocalegetLocale()The default behavior of this method is to return getLocale() on the wrapped response object.jakarta.servlet.ServletOutputStreamgetOutputStream()The default behavior of this method is to return getOutputStream() on the wrapped response object.jakarta.servlet.ServletResponsegetResponse()Return the wrapped ServletResponse object.PrintWritergetWriter()The default behavior of this method is to return getWriter() on the wrapped response object.booleanisCommitted()The default behavior of this method is to return isCommitted() on the wrapped response object.protected voidprocessResponse()voidreset()The default behavior of this method is to call reset() on the wrapped response object.voidresetBuffer()The default behavior of this method is to call resetBuffer() on the wrapped response object.voidsetBufferSize(int size)The default behavior of this method is to call setBufferSize(int size) on the wrapped response object.voidsetCharacterEncoding(String charSet)Sets the character encoding of the responsevoidsetContentLength(int len)The default behavior of this method is to call setContentLength(int len) on the wrapped response object.voidsetContentLengthLong(long len)voidsetContentType(String type)The default behavior of this method is to call setContentType(String type) on the wrapped response object.voidsetLocale(Locale loc)The default behavior of this method is to call setLocale(Locale loc) on the wrapped response object.voidsetResponse(jakarta.servlet.ServletResponse response)Sets the response being wrapped.
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
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:
getCharacterEncodingin interfacejakarta.servlet.ServletResponse- Returns:
- The character encoding of the response.
-
getContentType
public String getContentType()
Returns the MIME type for the content response- Specified by:
getContentTypein interfacejakarta.servlet.ServletResponse- Returns:
- MIME type of the content response
- Since:
- 2.4
-
getOutputStream
public jakarta.servlet.ServletOutputStream getOutputStream() throws IOExceptionThe default behavior of this method is to return getOutputStream() on the wrapped response object. Not serialized.- Specified by:
getOutputStreamin interfacejakarta.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:
getWriterin interfacejakarta.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:
setContentLengthin interfacejakarta.servlet.ServletResponse- Parameters:
len- The new content length of the response.
-
setContentLengthLong
public void setContentLengthLong(long len)
- Specified by:
setContentLengthLongin interfacejakarta.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:
setContentTypein interfacejakarta.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:
setBufferSizein interfacejakarta.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:
getBufferSizein interfacejakarta.servlet.ServletResponse- Returns:
- The buffer size of the response, -1 if unavailable.
-
flushBuffer
public void flushBuffer() throws IOExceptionThe default behavior of this method is to call flushBuffer() on the wrapped response object. Not serialized.- Specified by:
flushBufferin interfacejakarta.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:
isCommittedin interfacejakarta.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:
resetin interfacejakarta.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:
resetBufferin interfacejakarta.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:
setLocalein interfacejakarta.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:
setCharacterEncodingin interfacejakarta.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:
getLocalein interfacejakarta.servlet.ServletResponse- Returns:
- The locale of the response
-
-