Package com.aoapps.servlet.subrequest
Class ThreadSafeServletResponse
java.lang.Object
javax.servlet.ServletResponseWrapper
com.aoapps.servlet.subrequest.ThreadSafeServletResponse
- All Implemented Interfaces:
ServletResponse
- Direct Known Subclasses:
ThreadSafeHttpServletResponse
Synchronizes access to the wrapped response.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
boolean
boolean
isWrapperFor
(Class wrappedType) boolean
isWrapperFor
(ServletResponse wrapped) void
reset()
void
void
setBufferSize
(int size) void
setCharacterEncoding
(String charset) void
setContentLength
(int len) void
setContentLengthLong
(long len) void
setContentType
(String type) void
void
setResponse
(ServletResponse response)
-
Field Details
-
lock
-
-
Constructor Details
-
ThreadSafeServletResponse
-
-
Method Details
-
getResponse
- Overrides:
getResponse
in classServletResponseWrapper
-
setResponse
- Overrides:
setResponse
in classServletResponseWrapper
-
setCharacterEncoding
- Specified by:
setCharacterEncoding
in interfaceServletResponse
- Overrides:
setCharacterEncoding
in classServletResponseWrapper
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfaceServletResponse
- Overrides:
getCharacterEncoding
in classServletResponseWrapper
-
getOutputStream
- Specified by:
getOutputStream
in interfaceServletResponse
- Overrides:
getOutputStream
in classServletResponseWrapper
- Throws:
IOException
-
getWriter
- Specified by:
getWriter
in interfaceServletResponse
- Overrides:
getWriter
in classServletResponseWrapper
- Throws:
IOException
-
setContentLength
public void setContentLength(int len) - Specified by:
setContentLength
in interfaceServletResponse
- Overrides:
setContentLength
in classServletResponseWrapper
-
setContentLengthLong
public void setContentLengthLong(long len) - Specified by:
setContentLengthLong
in interfaceServletResponse
- Overrides:
setContentLengthLong
in classServletResponseWrapper
-
setContentType
- Specified by:
setContentType
in interfaceServletResponse
- Overrides:
setContentType
in classServletResponseWrapper
-
getContentType
- Specified by:
getContentType
in interfaceServletResponse
- Overrides:
getContentType
in classServletResponseWrapper
-
setBufferSize
public void setBufferSize(int size) - Specified by:
setBufferSize
in interfaceServletResponse
- Overrides:
setBufferSize
in classServletResponseWrapper
-
getBufferSize
public int getBufferSize()- Specified by:
getBufferSize
in interfaceServletResponse
- Overrides:
getBufferSize
in classServletResponseWrapper
-
flushBuffer
- Specified by:
flushBuffer
in interfaceServletResponse
- Overrides:
flushBuffer
in classServletResponseWrapper
- Throws:
IOException
-
isCommitted
public boolean isCommitted()- Specified by:
isCommitted
in interfaceServletResponse
- Overrides:
isCommitted
in classServletResponseWrapper
-
reset
public void reset()- Specified by:
reset
in interfaceServletResponse
- Overrides:
reset
in classServletResponseWrapper
-
resetBuffer
public void resetBuffer()- Specified by:
resetBuffer
in interfaceServletResponse
- Overrides:
resetBuffer
in classServletResponseWrapper
-
setLocale
- Specified by:
setLocale
in interfaceServletResponse
- Overrides:
setLocale
in classServletResponseWrapper
-
getLocale
- Specified by:
getLocale
in interfaceServletResponse
- Overrides:
getLocale
in classServletResponseWrapper
-
isWrapperFor
- Overrides:
isWrapperFor
in classServletResponseWrapper
-
isWrapperFor
- Overrides:
isWrapperFor
in classServletResponseWrapper
-