|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--org.apache.catalina.connector.RequestBase | +--org.apache.catalina.connector.HttpRequestBase
Convenience base implementation of the HttpRequest interface, which can be used for the Request implementation required by most Connectors that implement the HTTP protocol. Only the connector-specific methods need to be implemented.
内部クラスの概要 | |
protected class |
HttpRequestBase.PrivilegedGetSession
|
フィールドの概要 | |
protected java.lang.String |
authType
The authentication type used for this request. |
protected java.lang.String |
contextPath
The context path for this request. |
protected java.util.ArrayList |
cookies
The set of cookies associated with this Request. |
protected static java.util.ArrayList |
empty
An empty collection to use for returning empty Enumerations. |
protected HttpRequestFacade |
facade
The facade associated with this request. |
protected java.text.SimpleDateFormat[] |
formats
The set of SimpleDateFormat formats to use in getDateHeader(). |
protected java.util.HashMap |
headers
The HTTP headers associated with this Request, keyed by name. |
protected static java.lang.String |
info
Descriptive information about this HttpRequest implementation. |
protected java.lang.String |
method
The request method associated with this Request. |
protected ParameterMap |
parameters
The parsed parameters for this request. |
protected boolean |
parsed
Have the parameters for this request been parsed yet? |
protected java.lang.String |
pathInfo
The path information for this request. |
protected java.lang.String |
queryString
The query string for this request. |
protected boolean |
requestedSessionCookie
Was the requested session ID received in a cookie? |
protected java.lang.String |
requestedSessionId
The requested session ID (if any) for this request. |
protected boolean |
requestedSessionURL
Was the requested session ID received in a URL? |
protected java.lang.String |
requestURI
The request URI associated with this request. |
protected boolean |
secure
Was this request received on a secure channel? |
protected java.lang.String |
servletPath
The servlet path for this request. |
protected Session |
session
The currently active session for this request. |
protected java.security.Principal |
userPrincipal
The Principal who has been authenticated for this Request. |
クラス org.apache.catalina.connector.RequestBase から継承したフィールド |
attributes, authorization, characterEncoding, connector, contentLength, contentType, context, defaultLocale, input, locales, protocol, reader, remoteAddr, remoteHost, response, scheme, serverName, serverPort, sm, socket, stream, wrapper |
インタフェース javax.servlet.http.HttpServletRequest から継承したフィールド |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
コンストラクタの概要 | |
HttpRequestBase()
|
メソッドの概要 | |
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 |
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. |
java.lang.String |
getAuthType()
Return the authentication type used for this Request. |
java.lang.String |
getContextPath()
Return the portion of the request URI used to select the Context of the Request. |
javax.servlet.http.Cookie[] |
getCookies()
Return the set of Cookies received with this Request. |
long |
getDateHeader(java.lang.String name)
Return the value of the specified date header, if any; otherwise return -1. |
java.lang.String |
getHeader(java.lang.String name)
Return the first value of the specified header, if any; otherwise, return null |
java.util.Enumeration |
getHeaderNames()
Return the names of all headers received with this request. |
java.util.Enumeration |
getHeaders(java.lang.String name)
Return all of the values of the specified header, if any; otherwise, return an empty enumeration. |
java.lang.String |
getInfo()
Return descriptive information about this Request implementation and the corresponding version number, in the format <description>/<version> . |
int |
getIntHeader(java.lang.String name)
Return the value of the specified header as an integer, or -1 if there is no such header for this request. |
java.lang.String |
getMethod()
Return the HTTP request method used in this Request. |
java.lang.String |
getParameter(java.lang.String name)
Return the value of the specified request parameter, if any; otherwise, return null . |
java.util.Map |
getParameterMap()
Returns a Map of the parameters of this request.
|
java.util.Enumeration |
getParameterNames()
Return the names of all defined request parameters for this request. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Return the defined values for the specified request parameter, if any; otherwise, return null . |
java.lang.String |
getPathInfo()
Return the path information associated with this Request. |
java.lang.String |
getPathTranslated()
Return the extra path information for this request, translated to a real path. |
java.lang.String |
getQueryString()
Return the query string associated with this request. |
java.lang.String |
getRemoteUser()
Return the name of the remote user that has been authenticated for this Request. |
javax.servlet.ServletRequest |
getRequest()
Return the ServletRequest for which this object
is the facade. |
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String path)
Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path. |
java.lang.String |
getRequestedSessionId()
Return the session identifier included in this request, if any. |
java.lang.String |
getRequestURI()
Return the request URI for this request. |
java.lang.StringBuffer |
getRequestURL()
Reconstructs the URL the client used to make the request. |
java.lang.String |
getServletPath()
Return the portion of the request URI used to select the servlet that will process this request. |
javax.servlet.http.HttpSession |
getSession()
Return the session associated with this Request, creating one if necessary. |
javax.servlet.http.HttpSession |
getSession(boolean create)
Return the session associated with this Request, creating one if necessary and requested. |
java.security.Principal |
getUserPrincipal()
Return the principal that has been authenticated for this Request. |
boolean |
isRequestedSessionIdFromCookie()
Return true if the session identifier included in this
request came from a cookie. |
boolean |
isRequestedSessionIdFromUrl()
推奨されていません。 As of Version 2.1 of the Java Servlet API, use isRequestedSessionIdFromURL() instead. |
boolean |
isRequestedSessionIdFromURL()
Return true if the session identifier included in this
request came from the request URI. |
boolean |
isRequestedSessionIdValid()
Return true if the session identifier included in this
request identifies a valid session. |
boolean |
isSecure()
Was this request received on a secure connection? |
boolean |
isUserInRole(java.lang.String role)
Return true if the authenticated user principal
possesses the specified role name. |
protected void |
parseParameters()
Parse the parameters of this request, if it has not already occurred. |
void |
recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object. |
void |
setAuthType(java.lang.String authType)
Set the authentication type used for this request, if any; otherwise set the type to null . |
void |
setContextPath(java.lang.String path)
Set the context path for this Request. |
void |
setMethod(java.lang.String method)
Set the HTTP request method used for this Request. |
void |
setPathInfo(java.lang.String path)
Set the path information for this Request. |
void |
setQueryString(java.lang.String query)
Set the query string for this Request. |
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 |
setSecure(boolean secure)
Set the flag indicating whether this Request was received on a secure communications link or not. |
void |
setServletPath(java.lang.String path)
Set the servlet path for this Request. |
void |
setUserPrincipal(java.security.Principal principal)
Set the Principal who has been authenticated for this Request. |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
インタフェース org.apache.catalina.HttpRequest から継承したメソッド |
addLocale |
インタフェース org.apache.catalina.Request から継承したメソッド |
createInputStream, finishRequest, getAuthorization, getConnector, getContext, getNote, getNoteNames, getResponse, getSocket, getStream, getWrapper, removeNote, setAuthorization, setConnector, setContentLength, setContentType, setContext, setNote, setProtocol, setRemoteAddr, setResponse, setScheme, setServerName, setServerPort, setSocket, setStream, setWrapper |
インタフェース javax.servlet.ServletRequest から継承したメソッド |
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getScheme, getServerName, getServerPort, removeAttribute, setAttribute, setCharacterEncoding |
フィールドの詳細 |
protected java.lang.String authType
protected java.lang.String contextPath
protected java.util.ArrayList cookies
protected static java.util.ArrayList empty
protected java.text.SimpleDateFormat[] formats
protected HttpRequestFacade facade
protected java.util.HashMap headers
protected static final java.lang.String info
protected java.lang.String method
protected ParameterMap parameters
getParameter()
family of method calls. The key is the
parameter name, while the value is a String array of values for this
parameter.
IMPLEMENTATION NOTE - Once the parameters for a particular request are parsed and stored here, they are not modified. Therefore, application level access to the parameters need not be synchronized.
protected boolean parsed
protected java.lang.String pathInfo
protected java.lang.String queryString
protected boolean requestedSessionCookie
protected java.lang.String requestedSessionId
protected boolean requestedSessionURL
protected java.lang.String requestURI
protected boolean secure
protected java.lang.String servletPath
protected Session session
protected java.security.Principal userPrincipal
コンストラクタの詳細 |
public HttpRequestBase()
メソッドの詳細 |
public java.lang.String getInfo()
<description>/<version>
.Request
内の getInfo
RequestBase
内の getInfo
public javax.servlet.ServletRequest getRequest()
ServletRequest
for which this object
is the facade. This method must be implemented by a subclass.Request
内の getRequest
RequestBase
内の getRequest
public void addCookie(javax.servlet.http.Cookie cookie)
HttpRequest
内の addCookie
cookie
- The new cookiepublic void addHeader(java.lang.String name, java.lang.String value)
HttpRequest
内の addHeader
name
- The new header namevalue
- The new header valuepublic void addParameter(java.lang.String name, java.lang.String[] values)
HttpRequest
内の addParameter
name
- Name of this request parametervalues
- Corresponding values for this request parameterpublic void clearCookies()
HttpRequest
内の clearCookies
public void clearHeaders()
HttpRequest
内の clearHeaders
public void clearLocales()
HttpRequest
内の clearLocales
public void clearParameters()
HttpRequest
内の clearParameters
public void recycle()
Request
内の recycle
RequestBase
内の recycle
public void setAuthType(java.lang.String authType)
null
. Typical values are "BASIC",
"DIGEST", or "SSL".HttpRequest
内の setAuthType
authType
- The authentication type usedpublic void setContextPath(java.lang.String path)
HttpRequest
内の setContextPath
path
- The context pathpublic void setMethod(java.lang.String method)
HttpRequest
内の setMethod
method
- The request methodpublic void setPathInfo(java.lang.String path)
HttpRequest
内の setPathInfo
path
- The path informationpublic void setQueryString(java.lang.String query)
HttpRequest
内の setQueryString
query
- The query stringpublic void setRequestedSessionCookie(boolean flag)
HttpRequest
内の setRequestedSessionCookie
flag
- The new flagpublic void setRequestedSessionId(java.lang.String id)
HttpRequest
内の setRequestedSessionId
id
- The new session idpublic void setRequestedSessionURL(boolean flag)
HttpRequest
内の setRequestedSessionURL
flag
- The new flagpublic void setRequestURI(java.lang.String uri)
HttpRequest
内の setRequestURI
uri
- The request URIpublic void setSecure(boolean secure)
Request
内の setSecure
RequestBase
内の setSecure
secure
- The new secure flagpublic void setServletPath(java.lang.String path)
HttpRequest
内の setServletPath
path
- The servlet pathpublic void setUserPrincipal(java.security.Principal principal)
getRemoteUser()
method.HttpRequest
内の setUserPrincipal
principal
- The user Principalprotected void parseParameters()
public java.lang.String getParameter(java.lang.String name)
null
. If there is more than one value defined,
return only the first one.javax.servlet.ServletRequest
内の getParameter
RequestBase
内の getParameter
name
- Name of the desired request parameterpublic java.util.Map getParameterMap()
Map
of the parameters of this request.
Request parameters are extra information sent with the request.
For HTTP servlets, parameters are contained in the query string
or posted form data.javax.servlet.ServletRequest
内の getParameterMap
RequestBase
内の getParameterMap
Map
containing parameter names as keys
and parameter values as map values.public java.util.Enumeration getParameterNames()
javax.servlet.ServletRequest
内の getParameterNames
RequestBase
内の getParameterNames
public java.lang.String[] getParameterValues(java.lang.String name)
null
.javax.servlet.ServletRequest
内の getParameterValues
RequestBase
内の getParameterValues
name
- Name of the desired request parameterpublic javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
javax.servlet.ServletRequest
内の getRequestDispatcher
RequestBase
内の getRequestDispatcher
path
- Path of the resource to be wrappedpublic boolean isSecure()
javax.servlet.ServletRequest
内の isSecure
RequestBase
内の isSecure
public java.lang.String getAuthType()
javax.servlet.http.HttpServletRequest
内の getAuthType
public java.lang.String getContextPath()
javax.servlet.http.HttpServletRequest
内の getContextPath
public javax.servlet.http.Cookie[] getCookies()
javax.servlet.http.HttpServletRequest
内の getCookies
public long getDateHeader(java.lang.String name)
javax.servlet.http.HttpServletRequest
内の getDateHeader
name
- Name of the requested date headerjava.lang.IllegalArgumentException
- if the specified header value
cannot be converted to a datepublic java.lang.String getHeader(java.lang.String name)
null
javax.servlet.http.HttpServletRequest
内の getHeader
name
- Name of the requested headerpublic java.util.Enumeration getHeaders(java.lang.String name)
javax.servlet.http.HttpServletRequest
内の getHeaders
name
- Name of the requested headerpublic java.util.Enumeration getHeaderNames()
javax.servlet.http.HttpServletRequest
内の getHeaderNames
public int getIntHeader(java.lang.String name)
javax.servlet.http.HttpServletRequest
内の getIntHeader
name
- Name of the requested headerjava.lang.IllegalArgumentException
- if the specified header value
cannot be converted to an integerpublic java.lang.String getMethod()
javax.servlet.http.HttpServletRequest
内の getMethod
public java.lang.String getPathInfo()
javax.servlet.http.HttpServletRequest
内の getPathInfo
public java.lang.String getPathTranslated()
javax.servlet.http.HttpServletRequest
内の getPathTranslated
public java.lang.String getQueryString()
javax.servlet.http.HttpServletRequest
内の getQueryString
public java.lang.String getRemoteUser()
javax.servlet.http.HttpServletRequest
内の getRemoteUser
public java.lang.String getRequestedSessionId()
javax.servlet.http.HttpServletRequest
内の getRequestedSessionId
public java.lang.String getRequestURI()
javax.servlet.http.HttpServletRequest
内の getRequestURI
public java.lang.StringBuffer getRequestURL()
Because this method returns a StringBuffer
,
not a String
, you can modify the URL easily,
for example, to append query parameters.
This method is useful for creating redirect messages and for reporting errors.
javax.servlet.http.HttpServletRequest
内の getRequestURL
StringBuffer
object containing the
reconstructed URLpublic java.lang.String getServletPath()
javax.servlet.http.HttpServletRequest
内の getServletPath
public javax.servlet.http.HttpSession getSession()
javax.servlet.http.HttpServletRequest
内の getSession
public javax.servlet.http.HttpSession getSession(boolean create)
javax.servlet.http.HttpServletRequest
内の getSession
create
- Create a new session if one does not existpublic boolean isRequestedSessionIdFromCookie()
true
if the session identifier included in this
request came from a cookie.javax.servlet.http.HttpServletRequest
内の isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromURL()
true
if the session identifier included in this
request came from the request URI.javax.servlet.http.HttpServletRequest
内の isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromURL()
instead.
true
if the session identifier included in this
request came from the request URI.javax.servlet.http.HttpServletRequest
内の isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdValid()
true
if the session identifier included in this
request identifies a valid session.javax.servlet.http.HttpServletRequest
内の isRequestedSessionIdValid
public boolean isUserInRole(java.lang.String role)
true
if the authenticated user principal
possesses the specified role name.javax.servlet.http.HttpServletRequest
内の isUserInRole
role
- Role name to be validatedpublic java.security.Principal getUserPrincipal()
javax.servlet.http.HttpServletRequest
内の getUserPrincipal
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |