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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) booleanbooleanvoidremoveAttribute(String name) voidsetAttribute(String name, Object o) voidstartAsync(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, setRequestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getAttributein interfaceServletRequest- Overrides:
getAttributein classServletRequestWrapper
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceServletRequest- Overrides:
getAttributeNamesin classServletRequestWrapper
-
setAttribute
- Specified by:
setAttributein interfaceServletRequest- Overrides:
setAttributein classServletRequestWrapper
-
removeAttribute
- Specified by:
removeAttributein interfaceServletRequest- Overrides:
removeAttributein classServletRequestWrapper
-
getCharacterEncoding
- Specified by:
getCharacterEncodingin interfaceServletRequest- Overrides:
getCharacterEncodingin classServletRequestWrapper
-
setCharacterEncoding
- Specified by:
setCharacterEncodingin interfaceServletRequest- Overrides:
setCharacterEncodingin classServletRequestWrapper- Throws:
UnsupportedEncodingException
-
getInputStream
- Specified by:
getInputStreamin interfaceServletRequest- Overrides:
getInputStreamin classServletRequestWrapper- Throws:
IOException
-
getReader
- Specified by:
getReaderin interfaceServletRequest- Overrides:
getReaderin classServletRequestWrapper- Throws:
IOException
-
startAsync
- Specified by:
startAsyncin interfaceServletRequest- Overrides:
startAsyncin classServletRequestWrapper- Throws:
IllegalStateException
-
startAsync
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException - Specified by:
startAsyncin interfaceServletRequest- Overrides:
startAsyncin classServletRequestWrapper- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()- Specified by:
isAsyncStartedin interfaceServletRequest- Overrides:
isAsyncStartedin classServletRequestWrapper
-
isAsyncSupported
public boolean isAsyncSupported()- Specified by:
isAsyncSupportedin interfaceServletRequest- Overrides:
isAsyncSupportedin classServletRequestWrapper
-
getAsyncContext
- Specified by:
getAsyncContextin interfaceServletRequest- Overrides:
getAsyncContextin classServletRequestWrapper
-
