|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.core.MappingRequest
Field Summary | |
protected java.lang.String |
contextPath
|
protected java.lang.String |
decodedURI
|
protected java.lang.String |
pathInfo
|
protected java.lang.String |
queryString
|
protected java.lang.String |
servletPath
|
protected Wrapper |
wrapper
|
Fields inherited from interface javax.servlet.http.HttpServletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
MappingRequest(java.lang.String contextPath,
java.lang.String decodedURI,
java.lang.String queryString)
|
Method Summary | |
void |
addCookie(javax.servlet.http.Cookie cookie)
Add a Cookie to the set of Cookies associated with this Request. |
void |
addHeader(java.lang.String name,
java.lang.String value)
Add a Header to the set of Headers associated with this Request. |
void |
addLocale(java.util.Locale locale)
Add a Locale to the set of preferred Locales for this Request. |
void |
addParameter(java.lang.String name,
java.lang.String[] values)
Add a parameter name and corresponding set of values to this Request. |
void |
clearCookies()
Clear the collection of Cookies associated with this Request. |
void |
clearHeaders()
Clear the collection of Headers associated with this Request. |
void |
clearLocales()
Clear the collection of Locales associated with this Request. |
void |
clearParameters()
Clear the collection of parameters associated with this Request. |
javax.servlet.ServletInputStream |
createInputStream()
Create and return a ServletInputStream to read the content associated with this Request. |
void |
finishRequest()
Perform whatever actions are required to flush and close the input stream or reader, in a single operation. |
java.lang.Object |
getAttribute(java.lang.String name)
|
java.util.Enumeration |
getAttributeNames()
|
java.lang.String |
getAuthorization()
Return the authorization credentials sent with this request. |
java.lang.String |
getAuthType()
|
java.lang.String |
getCharacterEncoding()
|
Connector |
getConnector()
Return the Connector through which this Request was received. |
int |
getContentLength()
|
java.lang.String |
getContentType()
|
Context |
getContext()
Return the Context within which this Request is being processed. |
java.lang.String |
getContextPath()
|
javax.servlet.http.Cookie[] |
getCookies()
|
long |
getDateHeader(java.lang.String name)
|
java.lang.String |
getDecodedRequestURI()
Get the decoded request URI. |
java.lang.String |
getHeader(java.lang.String name)
|
java.util.Enumeration |
getHeaderNames()
|
java.util.Enumeration |
getHeaders(java.lang.String name)
|
java.lang.String |
getInfo()
Return descriptive information about this Request implementation and the corresponding version number, in the format <description>/<version> . |
javax.servlet.ServletInputStream |
getInputStream()
|
int |
getIntHeader(java.lang.String name)
|
java.util.Locale |
getLocale()
|
java.util.Enumeration |
getLocales()
|
java.lang.String |
getMethod()
|
java.lang.Object |
getNote(java.lang.String name)
Return the object bound with the specified name to the internal notes for this request, or null if no such binding exists. |
java.util.Iterator |
getNoteNames()
Return an Iterator containing the String names of all notes bindings that exist for this request. |
java.lang.String |
getParameter(java.lang.String name)
|
java.util.Map |
getParameterMap()
|
java.util.Enumeration |
getParameterNames()
|
java.lang.String[] |
getParameterValues(java.lang.String name)
|
java.lang.String |
getPathInfo()
|
java.lang.String |
getPathTranslated()
|
java.lang.String |
getProtocol()
|
java.lang.String |
getQueryString()
|
java.io.BufferedReader |
getReader()
|
java.lang.String |
getRealPath(java.lang.String path)
|
java.lang.String |
getRemoteAddr()
|
java.lang.String |
getRemoteHost()
|
java.lang.String |
getRemoteUser()
|
javax.servlet.ServletRequest |
getRequest()
Return the ServletRequest for which this object
is the facade. |
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String path)
|
java.lang.String |
getRequestedSessionId()
|
java.lang.String |
getRequestURI()
|
java.lang.StringBuffer |
getRequestURL()
|
Response |
getResponse()
Return the Response with which this Request is associated. |
java.lang.String |
getScheme()
|
java.lang.String |
getServerName()
|
int |
getServerPort()
|
java.lang.String |
getServletPath()
|
javax.servlet.http.HttpSession |
getSession()
|
javax.servlet.http.HttpSession |
getSession(boolean create)
|
java.net.Socket |
getSocket()
Return the Socket (if any) through which this Request was received. |
java.io.InputStream |
getStream()
Return the input stream associated with this Request. |
java.security.Principal |
getUserPrincipal()
|
Wrapper |
getWrapper()
Return the Wrapper within which this Request is being processed. |
boolean |
isRequestedSessionIdFromCookie()
|
boolean |
isRequestedSessionIdFromUrl()
|
boolean |
isRequestedSessionIdFromURL()
|
boolean |
isRequestedSessionIdValid()
|
boolean |
isSecure()
|
boolean |
isUserInRole(java.lang.String role)
|
void |
recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object. |
void |
removeAttribute(java.lang.String name)
|
void |
removeNote(java.lang.String name)
Remove any object bound to the specified name in the internal notes for this request. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
|
void |
setAuthorization(java.lang.String authorization)
Set the authorization credentials sent with this request. |
void |
setAuthType(java.lang.String authType)
Set the authentication type used for this request, if any; otherwise set the type to null . |
void |
setCharacterEncoding(java.lang.String enc)
|
void |
setConnector(Connector connector)
Set the Connector through which this Request was received. |
void |
setContentLength(int length)
Set the content length associated with this Request. |
void |
setContentType(java.lang.String type)
Set the content type (and optionally the character encoding) associated with this Request. |
void |
setContext(Context context)
Set the Context within which this Request is being processed. |
void |
setContextPath(java.lang.String path)
Set the context path for this Request. |
void |
setDecodedRequestURI(java.lang.String uri)
Set the decoded request URI. |
void |
setMethod(java.lang.String method)
Set the HTTP request method used for this Request. |
void |
setNote(java.lang.String name,
java.lang.Object value)
Bind an object to a specified name in the internal notes associated with this request, replacing any existing binding for this name. |
void |
setPathInfo(java.lang.String path)
Set the path information for this Request. |
void |
setProtocol(java.lang.String protocol)
Set the protocol name and version associated with this Request. |
void |
setQueryString(java.lang.String query)
Set the query string for this Request. |
void |
setRemoteAddr(java.lang.String remoteAddr)
Set the remote IP address associated with this Request. |
void |
setRemoteHost(java.lang.String remoteHost)
|
void |
setRequestedSessionCookie(boolean flag)
Set a flag indicating whether or not the requested session ID for this request came in through a cookie. |
void |
setRequestedSessionId(java.lang.String id)
Set the requested session ID for this request. |
void |
setRequestedSessionURL(boolean flag)
Set a flag indicating whether or not the requested session ID for this request came in through a URL. |
void |
setRequestURI(java.lang.String uri)
Set the unparsed request URI for this Request. |
void |
setResponse(Response response)
Set the Response with which this Request is associated. |
void |
setScheme(java.lang.String scheme)
Set the name of the scheme associated with this request. |
void |
setSecure(boolean secure)
Set the value to be returned by isSecure()
for this Request. |
void |
setServerName(java.lang.String name)
Set the name of the server (virtual host) to process this request. |
void |
setServerPort(int port)
Set the port number of the server to process this request. |
void |
setServletPath(java.lang.String path)
Set the servlet path for this Request. |
void |
setSocket(java.net.Socket socket)
Set the Socket (if any) through which this Request was received. |
void |
setStream(java.io.InputStream input)
Set the input stream associated with this Request. |
void |
setUserPrincipal(java.security.Principal principal)
Set the Principal who has been authenticated for this Request. |
void |
setWrapper(Wrapper wrapper)
Set the Wrapper within which this Request is being processed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String contextPath
protected java.lang.String decodedURI
protected java.lang.String queryString
protected java.lang.String pathInfo
protected java.lang.String servletPath
protected Wrapper wrapper
Constructor Detail |
public MappingRequest(java.lang.String contextPath, java.lang.String decodedURI, java.lang.String queryString)
Method Detail |
public java.lang.String getContextPath()
getContextPath
in interface javax.servlet.http.HttpServletRequest
public javax.servlet.ServletRequest getRequest()
Request
ServletRequest
for which this object
is the facade.
getRequest
in interface Request
public java.lang.String getDecodedRequestURI()
HttpRequest
getDecodedRequestURI
in interface HttpRequest
public java.lang.String getQueryString()
getQueryString
in interface javax.servlet.http.HttpServletRequest
public void setQueryString(java.lang.String query)
HttpRequest
setQueryString
in interface HttpRequest
query
- The query stringpublic java.lang.String getPathInfo()
getPathInfo
in interface javax.servlet.http.HttpServletRequest
public void setPathInfo(java.lang.String path)
HttpRequest
setPathInfo
in interface HttpRequest
path
- The path informationpublic java.lang.String getServletPath()
getServletPath
in interface javax.servlet.http.HttpServletRequest
public void setServletPath(java.lang.String path)
HttpRequest
setServletPath
in interface HttpRequest
path
- The servlet pathpublic Wrapper getWrapper()
Request
getWrapper
in interface Request
public void setWrapper(Wrapper wrapper)
Request
setWrapper
in interface Request
wrapper
- The newly associated Wrapperpublic java.lang.String getAuthorization()
Request
getAuthorization
in interface Request
public void setAuthorization(java.lang.String authorization)
Request
setAuthorization
in interface Request
authorization
- The new authorization credentialspublic Connector getConnector()
Request
getConnector
in interface Request
public void setConnector(Connector connector)
Request
setConnector
in interface Request
connector
- The new connectorpublic Context getContext()
Request
getContext
in interface Request
public void setContext(Context context)
Request
getContextPath()
,
and thus enables parsing of the request URI.
setContext
in interface Request
context
- The newly associated Contextpublic java.lang.String getInfo()
Request
<description>/<version>
.
getInfo
in interface Request
public Response getResponse()
Request
getResponse
in interface Request
public void setResponse(Response response)
Request
setResponse
in interface Request
response
- The new associated responsepublic java.net.Socket getSocket()
Request
getSocket
in interface Request
public void setSocket(java.net.Socket socket)
Request
setSocket
in interface Request
socket
- The socket through which this request was receivedpublic java.io.InputStream getStream()
Request
getStream
in interface Request
public void setStream(java.io.InputStream input)
Request
setStream
in interface Request
input
- The new input streampublic void addLocale(java.util.Locale locale)
HttpRequest
addLocale
in interface HttpRequest
locale
- The new preferred Localepublic javax.servlet.ServletInputStream createInputStream() throws java.io.IOException
Request
createInputStream
in interface Request
java.io.IOException
- if an input/output error occurspublic void finishRequest() throws java.io.IOException
Request
finishRequest
in interface Request
java.io.IOException
- if an input/output error occurspublic java.lang.Object getNote(java.lang.String name)
Request
null
if no such binding exists.
getNote
in interface Request
name
- Name of the note to be returnedpublic java.util.Iterator getNoteNames()
Request
getNoteNames
in interface Request
public void removeNote(java.lang.String name)
Request
removeNote
in interface Request
name
- Name of the note to be removedpublic void setContentType(java.lang.String type)
Request
text/html; charset=ISO-8859-4
.
setContentType
in interface Request
type
- The new content typepublic void setNote(java.lang.String name, java.lang.Object value)
Request
setNote
in interface Request
name
- Name to which the object should be boundvalue
- Object to be bound to the specified namepublic void setProtocol(java.lang.String protocol)
Request
setProtocol
in interface Request
protocol
- Protocol name and versionpublic void setRemoteAddr(java.lang.String remoteAddr)
Request
getRemoteHost()
if that method is called.
setRemoteAddr
in interface Request
remoteAddr
- The remote IP addresspublic void setRemoteHost(java.lang.String remoteHost)
public void setScheme(java.lang.String scheme)
Request
http
, https
, and ftp
.
setScheme
in interface Request
scheme
- The schemepublic void setServerName(java.lang.String name)
Request
setServerName
in interface Request
name
- The server namepublic void setServerPort(int port)
Request
setServerPort
in interface Request
port
- The server portpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface javax.servlet.ServletRequest
public java.util.Enumeration getAttributeNames()
getAttributeNames
in interface javax.servlet.ServletRequest
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface javax.servlet.ServletRequest
public int getContentLength()
getContentLength
in interface javax.servlet.ServletRequest
public void setContentLength(int length)
Request
setContentLength
in interface Request
length
- The new content lengthpublic java.lang.String getContentType()
getContentType
in interface javax.servlet.ServletRequest
public javax.servlet.ServletInputStream getInputStream() throws java.io.IOException
getInputStream
in interface javax.servlet.ServletRequest
java.io.IOException
public java.util.Locale getLocale()
getLocale
in interface javax.servlet.ServletRequest
public java.util.Enumeration getLocales()
getLocales
in interface javax.servlet.ServletRequest
public java.lang.String getProtocol()
getProtocol
in interface javax.servlet.ServletRequest
public java.io.BufferedReader getReader() throws java.io.IOException
getReader
in interface javax.servlet.ServletRequest
java.io.IOException
public java.lang.String getRealPath(java.lang.String path)
getRealPath
in interface javax.servlet.ServletRequest
public java.lang.String getRemoteAddr()
getRemoteAddr
in interface javax.servlet.ServletRequest
public java.lang.String getRemoteHost()
getRemoteHost
in interface javax.servlet.ServletRequest
public java.lang.String getScheme()
getScheme
in interface javax.servlet.ServletRequest
public java.lang.String getServerName()
getServerName
in interface javax.servlet.ServletRequest
public int getServerPort()
getServerPort
in interface javax.servlet.ServletRequest
public boolean isSecure()
isSecure
in interface javax.servlet.ServletRequest
public void removeAttribute(java.lang.String name)
removeAttribute
in interface javax.servlet.ServletRequest
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface javax.servlet.ServletRequest
public void setCharacterEncoding(java.lang.String enc) throws java.io.UnsupportedEncodingException
setCharacterEncoding
in interface javax.servlet.ServletRequest
java.io.UnsupportedEncodingException
public void addCookie(javax.servlet.http.Cookie cookie)
HttpRequest
addCookie
in interface HttpRequest
cookie
- The new cookiepublic void addHeader(java.lang.String name, java.lang.String value)
HttpRequest
addHeader
in interface HttpRequest
name
- The new header namevalue
- The new header valuepublic void addParameter(java.lang.String name, java.lang.String[] values)
HttpRequest
addParameter
in interface HttpRequest
name
- Name of this request parametervalues
- Corresponding values for this request parameterpublic void clearCookies()
HttpRequest
clearCookies
in interface HttpRequest
public void clearHeaders()
HttpRequest
clearHeaders
in interface HttpRequest
public void clearLocales()
HttpRequest
clearLocales
in interface HttpRequest
public void clearParameters()
HttpRequest
clearParameters
in interface HttpRequest
public void recycle()
Request
recycle
in interface Request
public void setAuthType(java.lang.String authType)
HttpRequest
null
. Typical values are "BASIC",
"DIGEST", or "SSL".
setAuthType
in interface HttpRequest
authType
- The authentication type usedpublic void setContextPath(java.lang.String path)
HttpRequest
setContextPath
in interface HttpRequest
path
- The context pathpublic void setMethod(java.lang.String method)
HttpRequest
setMethod
in interface HttpRequest
method
- The request methodpublic void setRequestedSessionCookie(boolean flag)
HttpRequest
setRequestedSessionCookie
in interface HttpRequest
flag
- The new flagpublic void setRequestedSessionId(java.lang.String id)
HttpRequest
setRequestedSessionId
in interface HttpRequest
id
- The new session idpublic void setRequestedSessionURL(boolean flag)
HttpRequest
setRequestedSessionURL
in interface HttpRequest
flag
- The new flagpublic void setRequestURI(java.lang.String uri)
HttpRequest
setRequestURI
in interface HttpRequest
uri
- The request URIpublic void setSecure(boolean secure)
Request
isSecure()
for this Request.
setSecure
in interface Request
secure
- The new isSecure valuepublic void setUserPrincipal(java.security.Principal principal)
HttpRequest
getRemoteUser()
method.
setUserPrincipal
in interface HttpRequest
principal
- The user Principalpublic java.lang.String getParameter(java.lang.String name)
getParameter
in interface javax.servlet.ServletRequest
public java.util.Map getParameterMap()
getParameterMap
in interface javax.servlet.ServletRequest
public java.util.Enumeration getParameterNames()
getParameterNames
in interface javax.servlet.ServletRequest
public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues
in interface javax.servlet.ServletRequest
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
getRequestDispatcher
in interface javax.servlet.ServletRequest
public java.lang.String getAuthType()
getAuthType
in interface javax.servlet.http.HttpServletRequest
public javax.servlet.http.Cookie[] getCookies()
getCookies
in interface javax.servlet.http.HttpServletRequest
public long getDateHeader(java.lang.String name)
getDateHeader
in interface javax.servlet.http.HttpServletRequest
public java.lang.String getHeader(java.lang.String name)
getHeader
in interface javax.servlet.http.HttpServletRequest
public java.util.Enumeration getHeaders(java.lang.String name)
getHeaders
in interface javax.servlet.http.HttpServletRequest
public java.util.Enumeration getHeaderNames()
getHeaderNames
in interface javax.servlet.http.HttpServletRequest
public int getIntHeader(java.lang.String name)
getIntHeader
in interface javax.servlet.http.HttpServletRequest
public java.lang.String getMethod()
getMethod
in interface javax.servlet.http.HttpServletRequest
public java.lang.String getPathTranslated()
getPathTranslated
in interface javax.servlet.http.HttpServletRequest
public java.lang.String getRemoteUser()
getRemoteUser
in interface javax.servlet.http.HttpServletRequest
public java.lang.String getRequestedSessionId()
getRequestedSessionId
in interface javax.servlet.http.HttpServletRequest
public java.lang.String getRequestURI()
getRequestURI
in interface javax.servlet.http.HttpServletRequest
public void setDecodedRequestURI(java.lang.String uri)
HttpRequest
setDecodedRequestURI
in interface HttpRequest
uri
- The decoded request URIpublic java.lang.StringBuffer getRequestURL()
getRequestURL
in interface javax.servlet.http.HttpServletRequest
public javax.servlet.http.HttpSession getSession()
getSession
in interface javax.servlet.http.HttpServletRequest
public javax.servlet.http.HttpSession getSession(boolean create)
getSession
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl
in interface javax.servlet.http.HttpServletRequest
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid
in interface javax.servlet.http.HttpServletRequest
public boolean isUserInRole(java.lang.String role)
isUserInRole
in interface javax.servlet.http.HttpServletRequest
public java.security.Principal getUserPrincipal()
getUserPrincipal
in interface javax.servlet.http.HttpServletRequest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |