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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
boolean
void
reset()
void
void
setBufferSize
(int size) void
setCharacterEncoding
(String charset) void
setContentLength
(int len) void
setContentLengthLong
(long len) void
setContentType
(String type) void
-
Field Details
-
lock
-
-
Constructor Details
-
UnmodifiableCopyServletResponse
-
-
Method Details
-
setCharacterEncoding
- Specified by:
setCharacterEncoding
in interfaceServletResponse
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfaceServletResponse
-
getOutputStream
- Specified by:
getOutputStream
in interfaceServletResponse
- Throws:
IOException
-
getWriter
- Specified by:
getWriter
in interfaceServletResponse
- Throws:
IOException
-
setContentLength
public void setContentLength(int len) - Specified by:
setContentLength
in interfaceServletResponse
-
setContentLengthLong
public void setContentLengthLong(long len) - Specified by:
setContentLengthLong
in interfaceServletResponse
-
setContentType
- Specified by:
setContentType
in interfaceServletResponse
-
getContentType
- Specified by:
getContentType
in interfaceServletResponse
-
setBufferSize
public void setBufferSize(int size) - Specified by:
setBufferSize
in interfaceServletResponse
-
getBufferSize
public int getBufferSize()- Specified by:
getBufferSize
in interfaceServletResponse
-
flushBuffer
- Specified by:
flushBuffer
in interfaceServletResponse
- Throws:
IOException
-
isCommitted
public boolean isCommitted()- Specified by:
isCommitted
in interfaceServletResponse
-
reset
public void reset()- Specified by:
reset
in interfaceServletResponse
-
resetBuffer
public void resetBuffer()- Specified by:
resetBuffer
in interfaceServletResponse
-
setLocale
- Specified by:
setLocale
in interfaceServletResponse
-
getLocale
- Specified by:
getLocale
in interfaceServletResponse
-