|
|||||||||
| Home >> All >> javax >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.servlet
Class ServletRequestWrapper

java.lang.Objectjavax.servlet.ServletRequestWrapper
- All Implemented Interfaces:
- ServletRequest
- public class ServletRequestWrapper
- extends java.lang.Object
- implements ServletRequest
- extends java.lang.Object
Provides a convenient implementation of the ServletRequest interface that can be subclassed by developers wishing to adapt the request to a Servlet. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.
- Since:
- v 2.3
| Field Summary | |
private ServletRequest |
request
|
| Constructor Summary | |
ServletRequestWrapper(ServletRequest request)
Creates a ServletRequest adaptor wrapping the given request object. |
|
| Method Summary | |
java.lang.Object |
getAttribute(java.lang.String name)
The default behavior of this method is to call getAttribute(String name) on the wrapped request object. |
java.util.Enumeration |
getAttributeNames()
The default behavior of this method is to return getAttributeNames() on the wrapped request object. |
java.lang.String |
getCharacterEncoding()
The default behavior of this method is to return getCharacterEncoding() on the wrapped request object. |
int |
getContentLength()
The default behavior of this method is to return getContentLength() on the wrapped request object. |
java.lang.String |
getContentType()
The default behavior of this method is to return getContentType() on the wrapped request object. |
ServletInputStream |
getInputStream()
The default behavior of this method is to return getInputStream() on the wrapped request object. |
java.lang.String |
getLocalAddr()
The default behavior of this method is to return getLocalAddr() on the wrapped request object. |
java.util.Locale |
getLocale()
The default behavior of this method is to return getLocale() on the wrapped request object. |
java.util.Enumeration |
getLocales()
The default behavior of this method is to return getLocales() on the wrapped request object. |
java.lang.String |
getLocalName()
The default behavior of this method is to return getLocalName() on the wrapped request object. |
int |
getLocalPort()
The default behavior of this method is to return getLocalPort() on the wrapped request object. |
java.lang.String |
getParameter(java.lang.String name)
The default behavior of this method is to return getParameter(String name) on the wrapped request object. |
java.util.Map |
getParameterMap()
The default behavior of this method is to return getParameterMap() on the wrapped request object. |
java.util.Enumeration |
getParameterNames()
The default behavior of this method is to return getParameterNames() on the wrapped request object. |
java.lang.String[] |
getParameterValues(java.lang.String name)
The default behavior of this method is to return getParameterValues(String name) on the wrapped request object. |
java.lang.String |
getProtocol()
The default behavior of this method is to return getProtocol() on the wrapped request object. |
java.io.BufferedReader |
getReader()
The default behavior of this method is to return getReader() on the wrapped request object. |
java.lang.String |
getRealPath(java.lang.String path)
The default behavior of this method is to return getRealPath(String path) on the wrapped request object. |
java.lang.String |
getRemoteAddr()
The default behavior of this method is to return getRemoteAddr() on the wrapped request object. |
java.lang.String |
getRemoteHost()
The default behavior of this method is to return getRemoteHost() on the wrapped request object. |
int |
getRemotePort()
The default behavior of this method is to return getRemotePort() on the wrapped request object. |
ServletRequest |
getRequest()
Return the wrapped request object. |
RequestDispatcher |
getRequestDispatcher(java.lang.String path)
The default behavior of this method is to return getRequestDispatcher(String path) on the wrapped request object. |
java.lang.String |
getScheme()
The default behavior of this method is to return getScheme() on the wrapped request object. |
java.lang.String |
getServerName()
The default behavior of this method is to return getServerName() on the wrapped request object. |
int |
getServerPort()
The default behavior of this method is to return getServerPort() on the wrapped request object. |
boolean |
isSecure()
The default behavior of this method is to return isSecure() on the wrapped request object. |
void |
removeAttribute(java.lang.String name)
The default behavior of this method is to call removeAttribute(String name) on the wrapped request object. |
void |
setAttribute(java.lang.String name,
java.lang.Object o)
The default behavior of this method is to return setAttribute(String name, Object o) on the wrapped request object. |
void |
setCharacterEncoding(java.lang.String enc)
The default behavior of this method is to set the character encoding on the wrapped request object. |
void |
setRequest(ServletRequest request)
Sets the request object being wrapped. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
request
private ServletRequest request
| Constructor Detail |
ServletRequestWrapper
public ServletRequestWrapper(ServletRequest request)
- Creates a ServletRequest adaptor wrapping the given request object.
| Method Detail |
getRequest
public ServletRequest getRequest()
- Return the wrapped request object.
setRequest
public void setRequest(ServletRequest request)
- Sets the request object being wrapped.
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
- The default behavior of this method is to call getAttribute(String name)
on the wrapped request object.
- Specified by:
getAttributein interfaceServletRequest
getAttributeNames
public java.util.Enumeration getAttributeNames()
- The default behavior of this method is to return getAttributeNames()
on the wrapped request object.
- Specified by:
getAttributeNamesin interfaceServletRequest
getCharacterEncoding
public java.lang.String getCharacterEncoding()
- The default behavior of this method is to return getCharacterEncoding()
on the wrapped request object.
- Specified by:
getCharacterEncodingin interfaceServletRequest
setCharacterEncoding
public void setCharacterEncoding(java.lang.String enc) throws java.io.UnsupportedEncodingException
- The default behavior of this method is to set the character encoding
on the wrapped request object.
- Specified by:
setCharacterEncodingin interfaceServletRequest
getContentLength
public int getContentLength()
- The default behavior of this method is to return getContentLength()
on the wrapped request object.
- Specified by:
getContentLengthin interfaceServletRequest
getContentType
public java.lang.String getContentType()
- The default behavior of this method is to return getContentType()
on the wrapped request object.
- Specified by:
getContentTypein interfaceServletRequest
getInputStream
public ServletInputStream getInputStream() throws java.io.IOException
- The default behavior of this method is to return getInputStream()
on the wrapped request object.
- Specified by:
getInputStreamin interfaceServletRequest
getParameter
public java.lang.String getParameter(java.lang.String name)
- The default behavior of this method is to return getParameter(String name)
on the wrapped request object.
- Specified by:
getParameterin interfaceServletRequest
getParameterMap
public java.util.Map getParameterMap()
- The default behavior of this method is to return getParameterMap()
on the wrapped request object.
- Specified by:
getParameterMapin interfaceServletRequest
getParameterNames
public java.util.Enumeration getParameterNames()
- The default behavior of this method is to return getParameterNames()
on the wrapped request object.
- Specified by:
getParameterNamesin interfaceServletRequest
getParameterValues
public java.lang.String[] getParameterValues(java.lang.String name)
- The default behavior of this method is to return getParameterValues(String name)
on the wrapped request object.
- Specified by:
getParameterValuesin interfaceServletRequest
getProtocol
public java.lang.String getProtocol()
- The default behavior of this method is to return getProtocol()
on the wrapped request object.
- Specified by:
getProtocolin interfaceServletRequest
getScheme
public java.lang.String getScheme()
- The default behavior of this method is to return getScheme()
on the wrapped request object.
- Specified by:
getSchemein interfaceServletRequest
getServerName
public java.lang.String getServerName()
- The default behavior of this method is to return getServerName()
on the wrapped request object.
- Specified by:
getServerNamein interfaceServletRequest
getServerPort
public int getServerPort()
- The default behavior of this method is to return getServerPort()
on the wrapped request object.
- Specified by:
getServerPortin interfaceServletRequest
getReader
public java.io.BufferedReader getReader() throws java.io.IOException
- The default behavior of this method is to return getReader()
on the wrapped request object.
- Specified by:
getReaderin interfaceServletRequest
getRemoteAddr
public java.lang.String getRemoteAddr()
- The default behavior of this method is to return getRemoteAddr()
on the wrapped request object.
- Specified by:
getRemoteAddrin interfaceServletRequest
getRemoteHost
public java.lang.String getRemoteHost()
- The default behavior of this method is to return getRemoteHost()
on the wrapped request object.
- Specified by:
getRemoteHostin interfaceServletRequest
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object o)
- The default behavior of this method is to return setAttribute(String name, Object o)
on the wrapped request object.
- Specified by:
setAttributein interfaceServletRequest
removeAttribute
public void removeAttribute(java.lang.String name)
- The default behavior of this method is to call removeAttribute(String name)
on the wrapped request object.
- Specified by:
removeAttributein interfaceServletRequest
getLocale
public java.util.Locale getLocale()
- The default behavior of this method is to return getLocale()
on the wrapped request object.
- Specified by:
getLocalein interfaceServletRequest
getLocales
public java.util.Enumeration getLocales()
- The default behavior of this method is to return getLocales()
on the wrapped request object.
- Specified by:
getLocalesin interfaceServletRequest
isSecure
public boolean isSecure()
- The default behavior of this method is to return isSecure()
on the wrapped request object.
- Specified by:
isSecurein interfaceServletRequest
getRequestDispatcher
public RequestDispatcher getRequestDispatcher(java.lang.String path)
- The default behavior of this method is to return getRequestDispatcher(String path)
on the wrapped request object.
- Specified by:
getRequestDispatcherin interfaceServletRequest
getRealPath
public java.lang.String getRealPath(java.lang.String path)
- The default behavior of this method is to return getRealPath(String path)
on the wrapped request object.
- Specified by:
getRealPathin interfaceServletRequest
getRemotePort
public int getRemotePort()
- The default behavior of this method is to return
getRemotePort() on the wrapped request object.
- Specified by:
getRemotePortin interfaceServletRequest
- Since:
- 2.4
getLocalName
public java.lang.String getLocalName()
- The default behavior of this method is to return
getLocalName() on the wrapped request object.
- Specified by:
getLocalNamein interfaceServletRequest
- Since:
- 2.4
getLocalAddr
public java.lang.String getLocalAddr()
- The default behavior of this method is to return
getLocalAddr() on the wrapped request object.
- Specified by:
getLocalAddrin interfaceServletRequest
- Since:
- 2.4
getLocalPort
public int getLocalPort()
- The default behavior of this method is to return
getLocalPort() on the wrapped request object.
- Specified by:
getLocalPortin interfaceServletRequest
- Since:
- 2.4
|
|||||||||
| Home >> All >> javax >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
javax.servlet.ServletRequestWrapper