FileDocCategorySizeDatePackage
SavedRequest.javaAPI DocGlassfish v2 API5848Fri May 04 22:31:54 BST 2007org.apache.catalina.authenticator

SavedRequest

public final class SavedRequest extends Object
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.

author
Craig R. McClanahan
version
$Revision: 1.3 $ $Date: 2007/05/05 05:31:53 $

Fields Summary
private ArrayList
cookies
The set of Cookies associated with this Request.
private HashMap
headers
The set of Headers associated with this Request. Each key is a header name, while the value is a ArrayList containing one or more actual values for this header. The values are returned as an Iterator when you ask for them.
private ArrayList
locales
The set of Locales associated with this Request.
private String
method
The request method used on this Request.
private HashMap
parameters
The set of request parameters associated with this Request. Each entry is keyed by the parameter name, pointing at a String array of the corresponding values.
private String
queryString
The query string associated with this Request.
private String
requestURI
The request URI associated with this Request.
Constructors Summary
Methods Summary
public voidaddCookie(javax.servlet.http.Cookie cookie)


        
        cookies.add(cookie);
    
public voidaddHeader(java.lang.String name, java.lang.String value)


          
        ArrayList values = (ArrayList) headers.get(name);
        if (values == null) {
            values = new ArrayList();
            headers.put(name, values);
        }
        values.add(value);
    
public voidaddLocale(java.util.Locale locale)


        
        locales.add(locale);
    
public voidaddParameter(java.lang.String name, java.lang.String[] values)


          
        parameters.put(name, values);
    
public java.util.IteratorgetCookies()

        return (cookies.iterator());
    
public java.util.IteratorgetHeaderNames()

        return (headers.keySet().iterator());
    
public java.util.IteratorgetHeaderValues(java.lang.String name)

        ArrayList values = (ArrayList) headers.get(name);
        if (values == null)
            return ((new ArrayList()).iterator());
        else
            return (values.iterator());
    
public java.util.IteratorgetLocales()

        return (locales.iterator());
    
public java.lang.StringgetMethod()


       
        return (this.method);
    
public java.util.IteratorgetParameterNames()

        return (parameters.keySet().iterator());
    
public java.lang.String[]getParameterValues(java.lang.String name)

        return ((String[]) parameters.get(name));
    
public java.lang.StringgetQueryString()


       
        return (this.queryString);
    
public java.lang.StringgetRequestURI()


       
        return (this.requestURI);
    
public voidsetMethod(java.lang.String method)

        this.method = method;
    
public voidsetQueryString(java.lang.String queryString)

        this.queryString = queryString;
    
public voidsetRequestURI(java.lang.String requestURI)

        this.requestURI = requestURI;