SUMMARY: CONSTR | METHOD | DETAIL: CONSTR | METHOD |
Note: Applications needing to provide their own session class implementations should subclass this class instead, and provide an instance of the subclass as the HTTP::Daemon::Threaded constructor's SessionCache parameter. Such subclass instances may then manufacture session objects using their own Session subclass.
Copyright© 2006, Dean Arnold, Presicient Corp., USA
All rights reserved.
Licensed under the Academic Free License version 2.1, as specified in the License.txt file included in this software package, or at OpenSource.org.
Unless otherwise noted, $self
is the object instance variable.
Constructor Summary |
---|
new()
Creates threads::shared object to contain any Session object that will be created |
Method Summary |
---|
addSession($session)
Add a new session to the cache |
createSession($id, $timeout, $dough, $expires)
Create a new session and store in the cache |
getSession($request)
Get a session from the cache |
openSession($cookie)
Recover an existing session from persistent storage |
removeSession($id)
Remove a session from the cache |
Constructor Details |
---|
new()
Subclasses should extend this to open any session storage, and possible pre-cache session contexts.
Method Details |
---|
addSession($session)
$session
- HTTP::Daemon::Threaded::Session object
createSession($id, $timeout, $dough, $expires)
$id
- (optional) unique ID of session to retrieve; default is whatever
the session object class generates
$timeout
- (optional) max inactivity timeout; default is class specific
$dough
- (optional) any information to be included in the session's cookie;
the $id will be prepended to this information
$expires
- (optional) RFC1123 formatted cookie expiration date string, or
'Never'; default is single session (nonpersistent)
getSession($request)
$request
- HTTP::Request object for which a session is to be located
openSession($cookie)
$cookie
- (required) HTTP Cookie header containing unique ID of
session to retrieve
removeSession($id)
$id
- unique ID of session to be removed