| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvelosurf.util.SavedRequest
public class SavedRequest
Object that saves the critical information from a request so that form-based authentication can reproduce it once the user has been authenticated.
IMPLEMENTATION NOTE - It is assumed that this object is accessed only from the context of a single thread, so no synchronization around internal collection classes is performed.
FIXME - Currently, this object has no mechanism to save or restore the data content of the request, although it does save request parameters so that a POST transaction can be faithfully duplicated.
The original source code is got from Apache Tomcat
| Field Summary | |
|---|---|
private  java.util.ArrayList | 
cookies
The set of Cookies associated with this Request.  | 
private  java.util.HashMap | 
headers
The set of Headers associated with this Request.  | 
private  java.util.ArrayList | 
locales
The set of Locales associated with this Request.  | 
private  java.lang.String | 
method
The request method used on this Request.  | 
private  java.util.HashMap | 
parameters
The set of request parameters associated with this Request.  | 
private  java.lang.String | 
pathInfo
The request pathInfo associated with this Request.  | 
private  java.lang.String | 
queryString
The query string associated with this Request.  | 
private  java.lang.String | 
requestURI
The request URI associated with this Request.  | 
| Constructor Summary | |
|---|---|
SavedRequest()
 | 
|
| Method Summary | |
|---|---|
 void | 
addCookie(javax.servlet.http.Cookie cookie)
Adds cookie to list of cookies.  | 
 void | 
addHeader(java.lang.String name,
          java.lang.String value)
Adds header.  | 
 void | 
addLocale(java.util.Locale locale)
Adds locale.  | 
 void | 
addParameter(java.lang.String name,
             java.lang.String[] values)
Adds parameter.  | 
 java.util.List | 
getCookies()
Returns list of cookies.  | 
 java.util.Iterator | 
getHeaderNames()
Returns iterator over header names.  | 
 java.util.Iterator | 
getHeaderValues(java.lang.String name)
Returns iterator over header values.  | 
 java.util.Iterator | 
getLocales()
Returns iterator over locales.  | 
 java.lang.String | 
getMethod()
Returns request method.  | 
 java.util.Map | 
getParameterMap()
Returns parameters.  | 
 java.util.Iterator | 
getParameterNames()
Returns iterator over parameter names.  | 
 java.lang.String[] | 
getParameterValues(java.lang.String name)
Returns parameter values.  | 
 java.lang.String | 
getPathInfo()
Returns path info.  | 
 java.lang.String | 
getQueryString()
Returns query string.  | 
 java.lang.String | 
getRequestURI()
Returns request URI.  | 
 java.lang.String | 
getRequestURL()
Gets uri with path info and query string.  | 
static SavedRequest | 
saveRequest(javax.servlet.http.HttpServletRequest request)
This method provides ability to create SavedRequest from HttpServletRequest.  | 
 void | 
setMethod(java.lang.String method)
Sets request method.  | 
 void | 
setPathInfo(java.lang.String pathInfo)
Sets path info.  | 
 void | 
setQueryString(java.lang.String queryString)
Sets query string.  | 
 void | 
setRequestURI(java.lang.String requestURI)
Sets request URI.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private java.util.ArrayList cookies
private java.util.HashMap headers
private java.util.ArrayList locales
private java.lang.String method
private java.util.HashMap parameters
private java.lang.String queryString
private java.lang.String requestURI
private java.lang.String pathInfo
| Constructor Detail | 
|---|
public SavedRequest()
| Method Detail | 
|---|
public void addCookie(javax.servlet.http.Cookie cookie)
cookie - cookie to addpublic java.util.List getCookies()
public void addHeader(java.lang.String name,
                      java.lang.String value)
name - header namevalue - header valuepublic java.util.Iterator getHeaderNames()
public java.util.Iterator getHeaderValues(java.lang.String name)
name - header name
public void addLocale(java.util.Locale locale)
locale - locale to addpublic java.util.Iterator getLocales()
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
method - request method to set
public void addParameter(java.lang.String name,
                         java.lang.String[] values)
name - parameter namevalues - parameter valuespublic java.util.Iterator getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String name)
name - parameter name
public java.util.Map getParameterMap()
public java.lang.String getQueryString()
public void setQueryString(java.lang.String queryString)
queryString - query string to setpublic java.lang.String getRequestURI()
public void setRequestURI(java.lang.String requestURI)
requestURI - request URI to setpublic java.lang.String getPathInfo()
public void setPathInfo(java.lang.String pathInfo)
pathInfo - path info to setpublic java.lang.String getRequestURL()
public static SavedRequest saveRequest(javax.servlet.http.HttpServletRequest request)
request - request to be saved
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||