FileDocCategorySizeDatePackage
HttpRequest.javaAPI DocGlassfish v2 API8077Fri May 04 22:31:52 BST 2007org.apache.catalina

HttpRequest

public interface HttpRequest implements Request
An HttpRequest is the Catalina internal facade for an HttpServletRequest that is to be processed, in order to produce the corresponding HttpResponse.
author
Craig R. McClanahan
version
$Revision: 1.3 $ $Date: 2007/05/05 05:31:51 $

Fields Summary
Constructors Summary
Methods Summary
public voidaddCookie(javax.servlet.http.Cookie cookie)
Add a Cookie to the set of Cookies associated with this Request.

param
cookie The new cookie

public voidaddHeader(java.lang.String name, java.lang.String value)
Add a Header to the set of Headers associated with this Request.

param
name The new header name
param
value The new header value

public voidaddLocale(java.util.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().

param
locale The new preferred Locale

public voidaddParameter(java.lang.String name, java.lang.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).

param
name Name of this request parameter
param
values Corresponding values for this request parameter

public voidclearCookies()
Clear the collection of Cookies associated with this Request.

public voidclearHeaders()
Clear the collection of Headers associated with this Request.

public voidclearLocales()
Clear the collection of Locales associated with this Request.

public voidclearParameters()
Clear the collection of parameters associated with this Request.

public org.apache.tomcat.util.buf.MessageBytesgetContextPathMB()
Get the context path.

return
the context path

public java.lang.StringgetDecodedRequestURI()
Get the decoded request URI.

return
the URL decoded request URI

public org.apache.tomcat.util.buf.MessageBytesgetDecodedRequestURIMB()
Get the decoded request URI.

return
the URL decoded request URI

public org.apache.tomcat.util.buf.MessageBytesgetPathInfoMB()
Get the path info.

return
the path info

public org.apache.tomcat.util.buf.MessageBytesgetRequestPathMB()
Get the request path.

return
the request path

public org.apache.tomcat.util.buf.MessageBytesgetServletPathMB()
Get the servlet path.

return
the servlet path

public voidsetAuthType(java.lang.String type)
Set the authentication type used for this request, if any; otherwise set the type to null. Typical values are "BASIC", "DIGEST", or "SSL".

param
type The authentication type used

public voidsetContextPath(java.lang.String path)
Set the context path for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.

param
path The context path

public voidsetDecodedRequestURI(java.lang.String uri)
Set the decoded request URI.

param
uri The decoded request URI

public voidsetMethod(java.lang.String method)
Set the HTTP request method used for this Request.

param
method The request method

public voidsetPathInfo(java.lang.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.

param
path The path information

public voidsetQueryString(java.lang.String query)
Set the query string for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.

param
query The query string

public voidsetRequestURI(java.lang.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.

param
uri The request URI

public voidsetRequestedSessionCookie(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.

param
flag The new flag

public voidsetRequestedSessionId(java.lang.String id)
Set the requested session ID for this request. This is normally called by the HTTP Connector, when it parses the request headers.

param
id The new session id

public voidsetRequestedSessionURL(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.

param
flag The new flag

public voidsetServletPath(java.lang.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.

param
path The servlet path

public voidsetUserPrincipal(java.security.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 the getRemoteUser() method.

param
principal The user Principal