FileDocCategorySizeDatePackage
SavedRequest.javaAPI DocApache Tomcat 6.0.145332Fri Jul 20 04:20:34 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.

author
Craig R. McClanahan
version
$Revision: 536381 $ $Date: 2007-05-09 01:58:24 +0200 (mer., 09 mai 2007) $

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.
private org.apache.tomcat.util.buf.ByteChunk
body
The body of this request.
private String
contentType
The content type of the request, used if this is a POST.
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<String> values = (ArrayList<String>) headers.get(name);
        if (values == null) {
            values = new ArrayList<String>();
            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 org.apache.tomcat.util.buf.ByteChunkgetBody()

    
       
        return (this.body);
    
public java.lang.StringgetContentType()

    
       
        return (this.contentType);
    
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 voidsetBody(org.apache.tomcat.util.buf.ByteChunk body)

        this.body = body;
    
public voidsetContentType(java.lang.String contentType)

        this.contentType = contentType;
    
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;