org.apache.commons.latka.http
Interface Session

All Known Implementing Classes:
SessionImpl

public interface Session

A Latka Session is a container that manages state information over 1+ HTTP request/response pairs over 1+ HTTP servers.

Author:
Doug Sale, Morgan Delagrange

Method Summary
 void addCookie(java.lang.String domain, java.lang.String path, java.lang.String name, java.lang.String value)
          Adds a cookie to all HTTP requests whose domain and path match (according to RFC2109).
 Request createRequest(java.lang.String label, java.net.URL url, int httpMethod, boolean followRedirects)
           
 Request createRequest(java.net.URL url, int httpMethod)
          Creates a request object with the specified URL and HTTP Method.
 java.lang.String getCookieValue(java.lang.String name)
          Returns the value of cookie name.
 

Method Detail

addCookie

public void addCookie(java.lang.String domain,
                      java.lang.String path,
                      java.lang.String name,
                      java.lang.String value)
Adds a cookie to all HTTP requests whose domain and path match (according to RFC2109).
Parameters:
domain - the domain to which the cookie should apply
path - the path to which the cookie should apply
name - the name of the cookie
value - the value of the cookie

createRequest

public Request createRequest(java.lang.String label,
                             java.net.URL url,
                             int httpMethod,
                             boolean followRedirects)

createRequest

public Request createRequest(java.net.URL url,
                             int httpMethod)
Creates a request object with the specified URL and HTTP Method.
Parameters:
url - The URL to request of the HTTP server.
httpMethod - An integer representing the HTTP method (e.g. GET, PUT) used to communicate with server.
Returns:
a new Request object representing the url and httpMethod
See Also:
Request.HTTP_METHOD_GET, Request.HTTP_METHOD_POST

getCookieValue

public java.lang.String getCookieValue(java.lang.String name)
Returns the value of cookie name.
Parameters:
name - the name of the cookie
Returns:
the value of the cookie, or null if the cookie isn't set


Copyright © 2001 Apache Software Foundation. Documenation generated September 13 2001.