Package com.aoapps.servlet.subrequest
Class UnmodifiableCopyServletResponse
java.lang.Object
com.aoapps.servlet.subrequest.UnmodifiableCopyServletResponse
- All Implemented Interfaces:
ServletResponse
- Direct Known Subclasses:
UnmodifiableCopyHttpServletResponse
Achieves thread safety by making copies of most fields during constructor and being unmodifiable.
This forms a base point for subrequests to diverge from.
Some methods have to read-through to the wrapped response, so it should not change state while this wrapper is in use. Synchronizes access to the wrapped response.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintbooleanvoidreset()voidvoidsetBufferSize(int size) voidsetCharacterEncoding(String charset) voidsetContentLength(int len) voidsetContentLengthLong(long len) voidsetContentType(String type) void
-
Field Details
-
lock
-
-
Constructor Details
-
UnmodifiableCopyServletResponse
-
-
Method Details
-
setCharacterEncoding
- Specified by:
setCharacterEncodingin interfaceServletResponse
-
getCharacterEncoding
- Specified by:
getCharacterEncodingin interfaceServletResponse
-
getOutputStream
- Specified by:
getOutputStreamin interfaceServletResponse- Throws:
IOException
-
getWriter
- Specified by:
getWriterin interfaceServletResponse- Throws:
IOException
-
setContentLength
public void setContentLength(int len) - Specified by:
setContentLengthin interfaceServletResponse
-
setContentLengthLong
public void setContentLengthLong(long len) - Specified by:
setContentLengthLongin interfaceServletResponse
-
setContentType
- Specified by:
setContentTypein interfaceServletResponse
-
getContentType
- Specified by:
getContentTypein interfaceServletResponse
-
setBufferSize
public void setBufferSize(int size) - Specified by:
setBufferSizein interfaceServletResponse
-
getBufferSize
public int getBufferSize()- Specified by:
getBufferSizein interfaceServletResponse
-
flushBuffer
- Specified by:
flushBufferin interfaceServletResponse- Throws:
IOException
-
isCommitted
public boolean isCommitted()- Specified by:
isCommittedin interfaceServletResponse
-
reset
public void reset()- Specified by:
resetin interfaceServletResponse
-
resetBuffer
public void resetBuffer()- Specified by:
resetBufferin interfaceServletResponse
-
setLocale
- Specified by:
setLocalein interfaceServletResponse
-
getLocale
- Specified by:
getLocalein interfaceServletResponse
-
