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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String name) int
long
int
getParameter
(String name) String[]
getParameterValues
(String name) getRealPath
(String path) Deprecated.int
getRequestDispatcher
(String path) int
boolean
boolean
boolean
isSecure()
void
removeAttribute
(String name) void
setAttribute
(String name, Object o) void
startAsync
(ServletRequest servletRequest, ServletResponse servletResponse)
-
Field Details
-
lock
-
-
Constructor Details
-
UnmodifiableCopyServletRequest
-
-
Method Details
-
getAttribute
- Specified by:
getAttribute
in interfaceServletRequest
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceServletRequest
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfaceServletRequest
-
setCharacterEncoding
- Specified by:
setCharacterEncoding
in interfaceServletRequest
- Throws:
UnsupportedEncodingException
-
getContentLength
public int getContentLength()- Specified by:
getContentLength
in interfaceServletRequest
-
getContentLengthLong
public long getContentLengthLong()- Specified by:
getContentLengthLong
in interfaceServletRequest
-
getContentType
- Specified by:
getContentType
in interfaceServletRequest
-
getInputStream
- Specified by:
getInputStream
in interfaceServletRequest
- Throws:
IOException
-
getParameter
- Specified by:
getParameter
in interfaceServletRequest
-
getParameterMap
- Specified by:
getParameterMap
in interfaceServletRequest
-
getParameterNames
- Specified by:
getParameterNames
in interfaceServletRequest
-
getParameterValues
- Specified by:
getParameterValues
in interfaceServletRequest
-
getProtocol
- Specified by:
getProtocol
in interfaceServletRequest
-
getScheme
- Specified by:
getScheme
in interfaceServletRequest
-
getServerName
- Specified by:
getServerName
in interfaceServletRequest
-
getServerPort
public int getServerPort()- Specified by:
getServerPort
in interfaceServletRequest
-
getReader
- Specified by:
getReader
in interfaceServletRequest
- Throws:
IOException
-
getRemoteAddr
- Specified by:
getRemoteAddr
in interfaceServletRequest
-
getRemoteHost
- Specified by:
getRemoteHost
in interfaceServletRequest
-
setAttribute
- Specified by:
setAttribute
in interfaceServletRequest
-
removeAttribute
- Specified by:
removeAttribute
in interfaceServletRequest
-
getLocale
- Specified by:
getLocale
in interfaceServletRequest
-
getLocales
- Specified by:
getLocales
in interfaceServletRequest
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfaceServletRequest
-
getRequestDispatcher
- Specified by:
getRequestDispatcher
in interfaceServletRequest
-
getRealPath
Deprecated.- Specified by:
getRealPath
in interfaceServletRequest
-
getRemotePort
public int getRemotePort()- Specified by:
getRemotePort
in interfaceServletRequest
-
getLocalName
- Specified by:
getLocalName
in interfaceServletRequest
-
getLocalAddr
- Specified by:
getLocalAddr
in interfaceServletRequest
-
getLocalPort
public int getLocalPort()- Specified by:
getLocalPort
in interfaceServletRequest
-
getServletContext
- Specified by:
getServletContext
in interfaceServletRequest
-
startAsync
- Specified by:
startAsync
in interfaceServletRequest
- Throws:
IllegalStateException
-
startAsync
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException - Specified by:
startAsync
in interfaceServletRequest
- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()- Specified by:
isAsyncStarted
in interfaceServletRequest
-
isAsyncSupported
public boolean isAsyncSupported()- Specified by:
isAsyncSupported
in interfaceServletRequest
-
getAsyncContext
- Specified by:
getAsyncContext
in interfaceServletRequest
-
getDispatcherType
- Specified by:
getDispatcherType
in interfaceServletRequest
-