org.apache.anteater.test
Class Session
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.types.DataType
|
+--org.apache.anteater.test.BaseDataType
|
+--org.apache.anteater.test.Session
- All Implemented Interfaces:
- Groupable
- public class Session
- extends BaseDataType
A minimalistic session object, for storing cookie headers between requests.
- Since:
- June 12, 2002
- Version:
- $Revision: 1.9 $ $Date: 2003/01/18 01:56:38 $
- Author:
- Jeff Turner
Fields inherited from class org.apache.tools.ant.types.DataType |
checked, description, ref |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Methods inherited from class org.apache.anteater.test.BaseDataType |
debug, getDataTypeName, getDebug, getGroup, getRef, print, println, setDebug, setGroup, setGroup, setRefid |
Methods inherited from class org.apache.tools.ant.types.DataType |
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, log, log, setProject |
cookies
protected SortedMap cookies
Session
public Session()
setCookie
public void setCookie(Header hdr)
- Takes a "Set-Cookie" header and stores it for later use.
Vastly oversimplifies cookie parsing, completely unrobust. See rfc2109
getCookieHeader
public Header getCookieHeader(String path)
- Retrieve a 'Set-Cookie' header for the specified path.
Tries to match the longest path first. Ie, if cookies for paths '/' and
'/foo' are set, then a request for '/foo/bar' will match the '/foo' cookie
before the '/' cookie.
- Parameters:
path
- Eg '/myapp/foo.jsp' or '/servlet/SessionServlet'
- Returns:
- A header, Cookie: JSESSIONID=........
toString
public String toString()
- Overrides:
toString
in class Object
Ant Functional Tester -- see Project home page for details