|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.core.DummyRequest
Dummy request object, used for request dispatcher mapping, as well as JSP precompilation.
| Field Summary | |
protected java.lang.String |
contextPath
|
protected java.lang.String |
decodedURI
|
protected javax.servlet.FilterChain |
filterChain
|
protected java.lang.String |
pathInfo
|
protected java.lang.String |
queryString
|
protected java.lang.String |
servletPath
|
protected ValveContext |
valveContext
|
protected Wrapper |
wrapper
|
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
DummyRequest()
|
|
DummyRequest(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()
|
MessageBytes |
getContextPathMB()
Get the context path. |
javax.servlet.http.Cookie[] |
getCookies()
|
long |
getDateHeader(java.lang.String name)
|
java.lang.String |
getDecodedRequestURI()
Get the decoded request URI. |
MessageBytes |
getDecodedRequestURIMB()
Get the decoded request URI. |
javax.servlet.FilterChain |
getFilterChain()
Get filter chain associated with the request. |
java.lang.String |
getHeader(java.lang.String name)
|
java.util.Enumeration |
getHeaderNames()
|
java.util.Enumeration |
getHeaders(java.lang.String name)
|
Host |
getHost()
Return the Host within which this Request is being processed. |
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.lang.String |
getLocalAddr()
|
java.util.Locale |
getLocale()
|
java.util.Enumeration |
getLocales()
|
java.lang.String |
getLocalName()
|
int |
getLocalPort()
|
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()
|
MessageBytes |
getPathInfoMB()
Get the path info. |
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()
|
int |
getRemotePort()
|
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()
|
MessageBytes |
getRequestPathMB()
Get the request path. |
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()
|
MessageBytes |
getServletPathMB()
Get the servlet path. |
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()
|
ValveContext |
getValveContext()
Get valve context. |
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 |
setFilterChain(javax.servlet.FilterChain filterChain)
Set filter chain associated with the request. |
void |
setHost(Host host)
Set the Host within which this Request is being processed. |
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 |
setValveContext(ValveContext valveContext)
Set valve context. |
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
protected javax.servlet.FilterChain filterChain
protected ValveContext valveContext
| Constructor Detail |
public DummyRequest()
public DummyRequest(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.HttpServletRequestpublic MessageBytes getContextPathMB()
HttpRequest
getContextPathMB in interface HttpRequestpublic javax.servlet.ServletRequest getRequest()
RequestServletRequest for which this object
is the facade.
getRequest in interface Requestpublic java.lang.String getDecodedRequestURI()
HttpRequest
getDecodedRequestURI in interface HttpRequestpublic MessageBytes getDecodedRequestURIMB()
HttpRequest
getDecodedRequestURIMB in interface HttpRequestpublic javax.servlet.FilterChain getFilterChain()
Request
getFilterChain in interface Requestpublic void setFilterChain(javax.servlet.FilterChain filterChain)
Request
setFilterChain in interface RequestfilterChain - new filter chainpublic java.lang.String getQueryString()
getQueryString in interface javax.servlet.http.HttpServletRequestpublic void setQueryString(java.lang.String query)
HttpRequest
setQueryString in interface HttpRequestquery - The query stringpublic java.lang.String getPathInfo()
getPathInfo in interface javax.servlet.http.HttpServletRequestpublic void setPathInfo(java.lang.String path)
HttpRequest
setPathInfo in interface HttpRequestpath - The path informationpublic MessageBytes getPathInfoMB()
HttpRequest
getPathInfoMB in interface HttpRequestpublic MessageBytes getRequestPathMB()
HttpRequest
getRequestPathMB in interface HttpRequestpublic java.lang.String getServletPath()
getServletPath in interface javax.servlet.http.HttpServletRequestpublic void setServletPath(java.lang.String path)
HttpRequest
setServletPath in interface HttpRequestpath - The servlet pathpublic MessageBytes getServletPathMB()
HttpRequest
getServletPathMB in interface HttpRequestpublic ValveContext getValveContext()
Request
getValveContext in interface Requestpublic void setValveContext(ValveContext valveContext)
Request
setValveContext in interface RequestvalveContext - New valve context objectpublic Wrapper getWrapper()
Request
getWrapper in interface Requestpublic void setWrapper(Wrapper wrapper)
Request
setWrapper in interface Requestwrapper - The newly associated Wrapperpublic java.lang.String getAuthorization()
Request
getAuthorization in interface Requestpublic void setAuthorization(java.lang.String authorization)
Request
setAuthorization in interface Requestauthorization - The new authorization credentialspublic Connector getConnector()
Request
getConnector in interface Requestpublic void setConnector(Connector connector)
Request
setConnector in interface Requestconnector - The new connectorpublic Context getContext()
Request
getContext in interface Requestpublic void setContext(Context context)
RequestgetContextPath(),
and thus enables parsing of the request URI.
setContext in interface Requestcontext - The newly associated Contextpublic Host getHost()
Request
getHost in interface Requestpublic void setHost(Host host)
Request
setHost in interface Requesthost - The newly associated Hostpublic java.lang.String getInfo()
Request<description>/<version>.
getInfo in interface Requestpublic Response getResponse()
Request
getResponse in interface Requestpublic void setResponse(Response response)
Request
setResponse in interface Requestresponse - The new associated responsepublic java.net.Socket getSocket()
Request
getSocket in interface Requestpublic void setSocket(java.net.Socket socket)
Request
setSocket in interface Requestsocket - The socket through which this request was receivedpublic java.io.InputStream getStream()
Request
getStream in interface Requestpublic void setStream(java.io.InputStream input)
Request
setStream in interface Requestinput - The new input streampublic void addLocale(java.util.Locale locale)
HttpRequest
addLocale in interface HttpRequestlocale - The new preferred Locale
public javax.servlet.ServletInputStream createInputStream()
throws java.io.IOException
Request
createInputStream in interface Requestjava.io.IOException - if an input/output error occurs
public void finishRequest()
throws java.io.IOException
Request
finishRequest in interface Requestjava.io.IOException - if an input/output error occurspublic java.lang.Object getNote(java.lang.String name)
Requestnull if no such binding exists.
getNote in interface Requestname - Name of the note to be returnedpublic java.util.Iterator getNoteNames()
Request
getNoteNames in interface Requestpublic void removeNote(java.lang.String name)
Request
removeNote in interface Requestname - Name of the note to be removedpublic void setContentType(java.lang.String type)
Requesttext/html; charset=ISO-8859-4.
setContentType in interface Requesttype - The new content type
public void setNote(java.lang.String name,
java.lang.Object value)
Request
setNote in interface Requestname - 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 Requestprotocol - Protocol name and versionpublic void setRemoteAddr(java.lang.String remoteAddr)
RequestgetRemoteHost()
if that method is called.
setRemoteAddr in interface RequestremoteAddr - The remote IP addresspublic void setRemoteHost(java.lang.String remoteHost)
public void setScheme(java.lang.String scheme)
Requesthttp, https, and ftp.
setScheme in interface Requestscheme - The schemepublic void setServerName(java.lang.String name)
Request
setServerName in interface Requestname - The server namepublic void setServerPort(int port)
Request
setServerPort in interface Requestport - The server portpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.ServletRequestpublic java.util.Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.ServletRequestpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletRequestpublic int getContentLength()
getContentLength in interface javax.servlet.ServletRequestpublic void setContentLength(int length)
Request
setContentLength in interface Requestlength - 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.ServletRequestjava.io.IOExceptionpublic java.util.Locale getLocale()
getLocale in interface javax.servlet.ServletRequestpublic java.util.Enumeration getLocales()
getLocales in interface javax.servlet.ServletRequestpublic java.lang.String getProtocol()
getProtocol in interface javax.servlet.ServletRequest
public java.io.BufferedReader getReader()
throws java.io.IOException
getReader in interface javax.servlet.ServletRequestjava.io.IOExceptionpublic java.lang.String getRealPath(java.lang.String path)
getRealPath in interface javax.servlet.ServletRequestpublic java.lang.String getRemoteAddr()
getRemoteAddr in interface javax.servlet.ServletRequestpublic java.lang.String getRemoteHost()
getRemoteHost in interface javax.servlet.ServletRequestpublic java.lang.String getScheme()
getScheme in interface javax.servlet.ServletRequestpublic java.lang.String getServerName()
getServerName in interface javax.servlet.ServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequestpublic boolean isSecure()
isSecure in interface javax.servlet.ServletRequestpublic 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.ServletRequestjava.io.UnsupportedEncodingExceptionpublic void addCookie(javax.servlet.http.Cookie cookie)
HttpRequest
addCookie in interface HttpRequestcookie - The new cookie
public void addHeader(java.lang.String name,
java.lang.String value)
HttpRequest
addHeader in interface HttpRequestname - The new header namevalue - The new header value
public void addParameter(java.lang.String name,
java.lang.String[] values)
HttpRequest
addParameter in interface HttpRequestname - Name of this request parametervalues - Corresponding values for this request parameterpublic void clearCookies()
HttpRequest
clearCookies in interface HttpRequestpublic void clearHeaders()
HttpRequest
clearHeaders in interface HttpRequestpublic void clearLocales()
HttpRequest
clearLocales in interface HttpRequestpublic void clearParameters()
HttpRequest
clearParameters in interface HttpRequestpublic void recycle()
Request
recycle in interface Requestpublic void setAuthType(java.lang.String authType)
HttpRequestnull. Typical values are "BASIC",
"DIGEST", or "SSL".
setAuthType in interface HttpRequestauthType - The authentication type usedpublic void setContextPath(java.lang.String path)
HttpRequest
setContextPath in interface HttpRequestpath - The context pathpublic void setMethod(java.lang.String method)
HttpRequest
setMethod in interface HttpRequestmethod - The request methodpublic void setRequestedSessionCookie(boolean flag)
HttpRequest
setRequestedSessionCookie in interface HttpRequestflag - The new flagpublic void setRequestedSessionId(java.lang.String id)
HttpRequest
setRequestedSessionId in interface HttpRequestid - The new session idpublic void setRequestedSessionURL(boolean flag)
HttpRequest
setRequestedSessionURL in interface HttpRequestflag - The new flagpublic void setRequestURI(java.lang.String uri)
HttpRequest
setRequestURI in interface HttpRequesturi - The request URIpublic void setSecure(boolean secure)
RequestisSecure()
for this Request.
setSecure in interface Requestsecure - The new isSecure valuepublic void setUserPrincipal(java.security.Principal principal)
HttpRequestgetRemoteUser() method.
setUserPrincipal in interface HttpRequestprincipal - The user Principalpublic java.lang.String getParameter(java.lang.String name)
getParameter in interface javax.servlet.ServletRequestpublic java.util.Map getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestpublic java.util.Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestpublic java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues in interface javax.servlet.ServletRequestpublic javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
getRequestDispatcher in interface javax.servlet.ServletRequestpublic java.lang.String getAuthType()
getAuthType in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.Cookie[] getCookies()
getCookies in interface javax.servlet.http.HttpServletRequestpublic long getDateHeader(java.lang.String name)
getDateHeader in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getHeader(java.lang.String name)
getHeader in interface javax.servlet.http.HttpServletRequestpublic java.util.Enumeration getHeaders(java.lang.String name)
getHeaders in interface javax.servlet.http.HttpServletRequestpublic java.util.Enumeration getHeaderNames()
getHeaderNames in interface javax.servlet.http.HttpServletRequestpublic int getIntHeader(java.lang.String name)
getIntHeader in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getMethod()
getMethod in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getPathTranslated()
getPathTranslated in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRequestedSessionId()
getRequestedSessionId in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getRequestURI()
getRequestURI in interface javax.servlet.http.HttpServletRequestpublic void setDecodedRequestURI(java.lang.String uri)
HttpRequest
setDecodedRequestURI in interface HttpRequesturi - The decoded request URIpublic java.lang.StringBuffer getRequestURL()
getRequestURL in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession()
getSession in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession(boolean create)
getSession in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface javax.servlet.http.HttpServletRequestpublic boolean isUserInRole(java.lang.String role)
isUserInRole in interface javax.servlet.http.HttpServletRequestpublic java.security.Principal getUserPrincipal()
getUserPrincipal in interface javax.servlet.http.HttpServletRequestpublic java.lang.String getLocalAddr()
getLocalAddr in interface javax.servlet.ServletRequestpublic java.lang.String getLocalName()
getLocalName in interface javax.servlet.ServletRequestpublic int getLocalPort()
getLocalPort in interface javax.servlet.ServletRequestpublic int getRemotePort()
getRemotePort in interface javax.servlet.ServletRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||