Package com.aoapps.servlet.subrequest
Class UnmodifiableCopyServletRequest
java.lang.Object
com.aoapps.servlet.subrequest.UnmodifiableCopyServletRequest
- All Implemented Interfaces:
ServletRequest
- Direct Known Subclasses:
UnmodifiableCopyHttpServletRequest
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 request, so it should not change state while this wrapper is in use. Synchronizes access to the wrapped request.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) intlongintgetParameter(String name) String[]getParameterValues(String name) getRealPath(String path) Deprecated.intgetRequestDispatcher(String path) intbooleanbooleanbooleanisSecure()voidremoveAttribute(String name) voidsetAttribute(String name, Object o) voidstartAsync(ServletRequest servletRequest, ServletResponse servletResponse)
-
Field Details
-
lock
-
-
Constructor Details
-
UnmodifiableCopyServletRequest
-
-
Method Details
-
getAttribute
- Specified by:
getAttributein interfaceServletRequest
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceServletRequest
-
getCharacterEncoding
- Specified by:
getCharacterEncodingin interfaceServletRequest
-
setCharacterEncoding
- Specified by:
setCharacterEncodingin interfaceServletRequest- Throws:
UnsupportedEncodingException
-
getContentLength
public int getContentLength()- Specified by:
getContentLengthin interfaceServletRequest
-
getContentLengthLong
public long getContentLengthLong()- Specified by:
getContentLengthLongin interfaceServletRequest
-
getContentType
- Specified by:
getContentTypein interfaceServletRequest
-
getInputStream
- Specified by:
getInputStreamin interfaceServletRequest- Throws:
IOException
-
getParameter
- Specified by:
getParameterin interfaceServletRequest
-
getParameterMap
- Specified by:
getParameterMapin interfaceServletRequest
-
getParameterNames
- Specified by:
getParameterNamesin interfaceServletRequest
-
getParameterValues
- Specified by:
getParameterValuesin interfaceServletRequest
-
getProtocol
- Specified by:
getProtocolin interfaceServletRequest
-
getScheme
- Specified by:
getSchemein interfaceServletRequest
-
getServerName
- Specified by:
getServerNamein interfaceServletRequest
-
getServerPort
public int getServerPort()- Specified by:
getServerPortin interfaceServletRequest
-
getReader
- Specified by:
getReaderin interfaceServletRequest- Throws:
IOException
-
getRemoteAddr
- Specified by:
getRemoteAddrin interfaceServletRequest
-
getRemoteHost
- Specified by:
getRemoteHostin interfaceServletRequest
-
setAttribute
- Specified by:
setAttributein interfaceServletRequest
-
removeAttribute
- Specified by:
removeAttributein interfaceServletRequest
-
getLocale
- Specified by:
getLocalein interfaceServletRequest
-
getLocales
- Specified by:
getLocalesin interfaceServletRequest
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceServletRequest
-
getRequestDispatcher
- Specified by:
getRequestDispatcherin interfaceServletRequest
-
getRealPath
Deprecated.- Specified by:
getRealPathin interfaceServletRequest
-
getRemotePort
public int getRemotePort()- Specified by:
getRemotePortin interfaceServletRequest
-
getLocalName
- Specified by:
getLocalNamein interfaceServletRequest
-
getLocalAddr
- Specified by:
getLocalAddrin interfaceServletRequest
-
getLocalPort
public int getLocalPort()- Specified by:
getLocalPortin interfaceServletRequest
-
getServletContext
- Specified by:
getServletContextin interfaceServletRequest
-
startAsync
- Specified by:
startAsyncin interfaceServletRequest- Throws:
IllegalStateException
-
startAsync
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException - Specified by:
startAsyncin interfaceServletRequest- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()- Specified by:
isAsyncStartedin interfaceServletRequest
-
isAsyncSupported
public boolean isAsyncSupported()- Specified by:
isAsyncSupportedin interfaceServletRequest
-
getAsyncContext
- Specified by:
getAsyncContextin interfaceServletRequest
-
getDispatcherType
- Specified by:
getDispatcherTypein interfaceServletRequest
-
