Package org.apache.catalina
Interface HttpRequest
-
- All Superinterfaces:
Request
- All Known Implementing Classes:
DummyRequest,HttpRequestWrapper,PwcCoyoteRequest,Request
public interface HttpRequest extends Request
An HttpRequest is the Catalina internal facade for anHttpServletRequestthat is to be processed, in order to produce the correspondingHttpResponse.- Version:
- $Revision: 1.3 $ $Date: 2007/05/05 05:31:51 $
- Author:
- Craig R. McClanahan
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCookie(jakarta.servlet.http.Cookie cookie)Add a Cookie to the set of Cookies associated with this Request.voidaddHeader(String name, String value)Add a Header to the set of Headers associated with this Request.voidaddLocale(Locale locale)Add a Locale to the set of preferred Locales for this Request.voidaddParameter(String name, String[] values)Add a parameter name and corresponding set of values to this Request.voidclearCookies()Clear the collection of Cookies associated with this Request.voidclearHeaders()Clear the collection of Headers associated with this Request.voidclearLocales()Clear the collection of Locales associated with this Request.voidclearParameters()Clear the collection of parameters associated with this Request.StringgetDecodedRequestURI()Get the decoded request URI.org.glassfish.grizzly.http.util.DataChunkgetRequestPathMB()Get the request path.voidreplayPayload(byte[] payloadByteArray)voidsetAuthType(String type)Set the authentication type used for this request, if any; otherwise set the type tonull.voidsetMethod(String method)Set the HTTP request method used for this Request.voidsetPathInfo(String path)Set the path information for this Request.voidsetQueryString(String query)Set the query string for this Request.voidsetRequestedSessionCookie(boolean flag)Set a flag indicating whether or not the requested session ID for this request came in through a cookie.voidsetRequestedSessionId(String id)Set the requested session ID for this request.voidsetRequestedSessionURL(boolean flag)Set a flag indicating whether or not the requested session ID for this request came in through a URL.voidsetRequestURI(String uri)Set the unparsed request URI for this Request.voidsetServletPath(String path)Set the servlet path for this Request.voidsetUserPrincipal(Principal principal)Set the Principal who has been authenticated for this Request.-
Methods inherited from interface org.apache.catalina.Request
changeSessionId, createInputStream, disableAsyncSupport, finishRequest, generateSessionId, getAuthorization, getCheckRestrictedResources, getConnector, getContext, getFilterChain, getHost, getInfo, getJrouteId, getNote, getNoteNames, getRequest, getRequest, getResponse, getSessionInternal, getSocket, getStream, getWrapper, lockSession, recycle, removeNote, setCheckRestrictedResources, setConnector, setContentLength, setContentType, setContext, setFilterChain, setHost, setNote, setProtocol, setRemoteAddr, setRequestedSessionCookiePath, setResponse, setSecure, setServerName, setServerPort, setSocket, setStream, setWrapper, unlockSession
-
-
-
-
Method Detail
-
addCookie
void addCookie(jakarta.servlet.http.Cookie cookie)
Add a Cookie to the set of Cookies associated with this Request.- Parameters:
cookie- The new cookie
-
addHeader
void addHeader(String name, String value)
Add a Header to the set of Headers associated with this Request.- Parameters:
name- The new header namevalue- The new header value
-
addLocale
void addLocale(Locale locale)
Add a Locale to the set of preferred Locales for this Request. The first added Locale will be the first one returned by getLocales().- Parameters:
locale- The new preferred Locale
-
addParameter
void addParameter(String name, String[] values)
Add a parameter name and corresponding set of values to this Request. (This is used when restoring the original request on a form based login).- Parameters:
name- Name of this request parametervalues- Corresponding values for this request parameter
-
clearCookies
void clearCookies()
Clear the collection of Cookies associated with this Request.
-
clearHeaders
void clearHeaders()
Clear the collection of Headers associated with this Request.
-
clearLocales
void clearLocales()
Clear the collection of Locales associated with this Request.
-
clearParameters
void clearParameters()
Clear the collection of parameters associated with this Request.
-
replayPayload
void replayPayload(byte[] payloadByteArray)
-
setAuthType
void setAuthType(String type)
Set the authentication type used for this request, if any; otherwise set the type tonull. Typical values are "BASIC", "DIGEST", or "SSL".- Parameters:
type- The authentication type used
-
setMethod
void setMethod(String method)
Set the HTTP request method used for this Request.- Parameters:
method- The request method
-
setQueryString
void setQueryString(String query)
Set the query string for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.- Parameters:
query- The query string
-
setPathInfo
void setPathInfo(String path)
Set the path information for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.- Parameters:
path- The path information
-
getRequestPathMB
org.glassfish.grizzly.http.util.DataChunk getRequestPathMB()
Get the request path.- Returns:
- the request path
-
setRequestedSessionCookie
void setRequestedSessionCookie(boolean flag)
Set a flag indicating whether or not the requested session ID for this request came in through a cookie. This is normally called by the HTTP Connector, when it parses the request headers.- Parameters:
flag- The new flag
-
setRequestedSessionId
void setRequestedSessionId(String id)
Set the requested session ID for this request. This is normally called by the HTTP Connector, when it parses the request headers.- Parameters:
id- The new session id
-
setRequestedSessionURL
void setRequestedSessionURL(boolean flag)
Set a flag indicating whether or not the requested session ID for this request came in through a URL. This is normally called by the HTTP Connector, when it parses the request headers.- Parameters:
flag- The new flag
-
setRequestURI
void setRequestURI(String uri)
Set the unparsed request URI for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.- Parameters:
uri- The request URI
-
getDecodedRequestURI
String getDecodedRequestURI()
Get the decoded request URI.- Returns:
- the URL decoded request URI
-
setServletPath
void setServletPath(String path)
Set the servlet path for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.- Parameters:
path- The servlet path
-
setUserPrincipal
void setUserPrincipal(Principal principal)
Set the Principal who has been authenticated for this Request. This value is also used to calculate the value to be returned by thegetRemoteUser()method.- Parameters:
principal- The user Principal
-
-