Package sunlabs.brazil.session

A generic, extensible mechanism for managing session state.

See:
          Description

Interface Summary
PropertiesCacheManager.Saveable This interface allows for persistence of non-properties session objects.
 

Class Summary
CacheManager This SessionManager associates an object with a Session ID to give Handlers the ability to maintain state that lasts for the duration of a session instead of just for the duration of a request.
PropertiesCacheManager A version of the CacheManager that saves out any session state that is either a "java properties" object, or implements "Saveable" into a directory in the filesystem, one file per entry, then restores them on server startup.
SessionManager The SessionManager associates an object with a Session ID to give Handlers the ability to maintain state that lasts for the duration of a session instead of just for the duration of a request.
 

Package sunlabs.brazil.session Description

A generic, extensible mechanism for managing session state.

The SessionManager associates an object with a Session ID to give Handlers the ability to maintain state that lasts for the duration of a session instead of just for the duration of a request.

An example of session-lifetime information is the set of stocks that a particular user is interested in. When the hypothetical StockHandler gets a request, it would get determine which stocks to display based on the Session ID of the request.

Operating with the SessionManager is the mechanism to discover the Session ID of a request and/or create new Session IDs. For example, the first time a user goes to the server providing the stock market information, they could get a cookie. Subsequently, every time they visit the stock market page the cookie present in the request would be decoded and matched with the existing Session ID for use by the StockHandler.

The SessionManager operates as a bag of globally accessible resources. Existing subclasses of the SessionManager also provide persistence, that is, a way to recover these resources even if the server process is terminated and later restarted, to get back to the state things were in.


Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.