NAME
Wombat::SessionManager::SessionManagerBase - session manager base class
SYNOPSIS
DESCRIPTION
Minimal base implementation of Wombat::SessionManager. This class supports no session persistence or distributable capabilities. This class may be subclassed to create more sophisticated Manager implementations. Subclasses MUST override add()
, getName()
, getSession()
, getSessions()
, and remove()
.
CONSTRUCTOR
- new()
-
Construct and return a Wombat::SessionManager::SessionManagerBase instance, initializing fields appropriately. If subclasses override the constructor, they must be sure to call
$self->SUPER::new();
ACCESSOR METHODS
- getContainer()
-
Return the Container for which this SessionManager manages Sessions.
- setContainer($container)
-
Set the Container for which this SessionManager manages Sessions.
Parameters:
- getMaxInactiveInterval()
-
Return the default maximum inactive interval in seconds for Sessions created by this SessionManager.
- setMaxInactiveInterval($interval)
-
Set the default maximum inactive interval for Sessions created by this SessionManager.
Parameters:
PUBLIC METHODS
- createSession()
-
Construct and return a Wombat::Session, based on the default settings specified by this SessionManager's fields. The session id will be assigned by this method.
Throws:
PACKAGE METHODS
Subclasses MUST override all of these methods.
- add($session)
-
Add this Session to the set of active Sessions for this SessionManager.
Parameters:
- getName()
-
Return the display name of this SessionManager.
- getSession($id)
-
Return the active Session managed by this SessionManager with the specified id, or
undef
if no session exists with that id.Parameters:
Throws:
- getSessions()
-
Return an array containing the active Sessions managed by this SessionManager.
- remove($session)
-
Remove this Session from the active Sessions managed by this SessionManager.
Parameters:
LIFECYCLE METHODS
- start()
-
Prepare for active use of this SessionManager. This method should be called before any of the public methods of the SessionManager are utilized.
Throws:
- stop()
-
Gracefully terminate active use of this SessionManager. Once this method has been called, no public methods of the SessionManager should be utilized.
Throws:
SEE ALSO
Wombat::Container, Wombat::Core::Session
AUTHOR
Brian Moseley, bcm@maz.org