Package com.aoapps.servlet.subrequest
Class ServletSubRequestWrapper
java.lang.Object
javax.servlet.ServletRequestWrapper
com.aoapps.servlet.subrequest.ServletSubRequestWrapper
- All Implemented Interfaces:
IServletSubRequest
,ServletRequest
- Direct Known Subclasses:
HttpServletSubRequestWrapper
Wraps a servlet request with the intent to operate as a concurrent sub request.
Any changes made to the request will only affect this request and will not be passed
along to the wrapped request.
It is expected that the wrapped request will not change for the life of this wrapper. If it does change, the changes may or may not be visible depending on what has been accessed and changed on this request.
This class is not thread safe.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String name) boolean
boolean
void
removeAttribute
(String name) void
setAttribute
(String name, Object o) void
startAsync
(ServletRequest servletRequest, ServletResponse servletResponse) Methods inherited from class javax.servlet.ServletRequestWrapper
getContentLength, getContentLengthLong, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isSecure, isWrapperFor, isWrapperFor, setRequest
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.servlet.ServletRequest
getContentLength, getContentLengthLong, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isSecure
-
Constructor Details
-
ServletSubRequestWrapper
-
-
Method Details
-
getAttribute
- Specified by:
getAttribute
in interfaceServletRequest
- Overrides:
getAttribute
in classServletRequestWrapper
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceServletRequest
- Overrides:
getAttributeNames
in classServletRequestWrapper
-
setAttribute
- Specified by:
setAttribute
in interfaceServletRequest
- Overrides:
setAttribute
in classServletRequestWrapper
-
removeAttribute
- Specified by:
removeAttribute
in interfaceServletRequest
- Overrides:
removeAttribute
in classServletRequestWrapper
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfaceServletRequest
- Overrides:
getCharacterEncoding
in classServletRequestWrapper
-
setCharacterEncoding
- Specified by:
setCharacterEncoding
in interfaceServletRequest
- Overrides:
setCharacterEncoding
in classServletRequestWrapper
- Throws:
UnsupportedEncodingException
-
getInputStream
- Specified by:
getInputStream
in interfaceServletRequest
- Overrides:
getInputStream
in classServletRequestWrapper
- Throws:
IOException
-
getReader
- Specified by:
getReader
in interfaceServletRequest
- Overrides:
getReader
in classServletRequestWrapper
- Throws:
IOException
-
startAsync
- Specified by:
startAsync
in interfaceServletRequest
- Overrides:
startAsync
in classServletRequestWrapper
- Throws:
IllegalStateException
-
startAsync
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException - Specified by:
startAsync
in interfaceServletRequest
- Overrides:
startAsync
in classServletRequestWrapper
- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()- Specified by:
isAsyncStarted
in interfaceServletRequest
- Overrides:
isAsyncStarted
in classServletRequestWrapper
-
isAsyncSupported
public boolean isAsyncSupported()- Specified by:
isAsyncSupported
in interfaceServletRequest
- Overrides:
isAsyncSupported
in classServletRequestWrapper
-
getAsyncContext
- Specified by:
getAsyncContext
in interfaceServletRequest
- Overrides:
getAsyncContext
in classServletRequestWrapper
-