|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A Manager manages the pool of Sessions that are associated with a particular Container. Different Manager implementations may support value-added features such as the persistent storage of session data, as well as migrating sessions for distributable web applications.
In order for a Manager implementation to successfully operate
with a Context implementation that implements reloading, it
must obey the following constraints:
Lifecycle so that the Context can indicate
that a restart is required.
stop() to be followed by a call to
start() on the same Manager instance.
| Method Summary | |
void |
add(Session session)
Add this Session to the set of active Sessions for this Manager. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component. |
Session |
createEmptySession()
Get a session from the recycled ones or create a new empty one. |
Session |
createSession()
Construct and return a new session object, based on the default settings specified by this Manager's properties. |
Session |
findSession(java.lang.String id)
Return the active Session, associated with this Manager, with the specified session id (if any); otherwise return null. |
Session[] |
findSessions()
Return the set of active Sessions associated with this Manager. |
Container |
getContainer()
Return the Container with which this Manager is associated. |
DefaultContext |
getDefaultContext()
Return the DefaultContext with which this Manager is associated. |
boolean |
getDistributable()
Return the distributable flag for the sessions supported by this Manager. |
java.lang.String |
getInfo()
Return descriptive information about this Manager implementation and the corresponding version number, in the format <description>/<version>. |
int |
getMaxInactiveInterval()
Return the default maximum inactive interval (in seconds) for Sessions created by this Manager. |
void |
load()
Load any currently active sessions that were previously unloaded to the appropriate persistence mechanism, if any. |
void |
remove(Session session)
Remove this Session from the active Sessions for this Manager. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component. |
void |
setContainer(Container container)
Set the Container with which this Manager is associated. |
void |
setDefaultContext(DefaultContext defaultContext)
Set the DefaultContext with which this Manager is associated. |
void |
setDistributable(boolean distributable)
Set the distributable flag for the sessions supported by this Manager. |
void |
setMaxInactiveInterval(int interval)
Set the default maximum inactive interval (in seconds) for Sessions created by this Manager. |
void |
unload()
Save any currently active sessions in the appropriate persistence mechanism, if any. |
| Method Detail |
public Container getContainer()
public void setContainer(Container container)
container - The newly associated Containerpublic DefaultContext getDefaultContext()
public void setDefaultContext(DefaultContext defaultContext)
defaultContext - The newly associated DefaultContextpublic boolean getDistributable()
public void setDistributable(boolean distributable)
distributable - The new distributable flagpublic java.lang.String getInfo()
<description>/<version>.
public int getMaxInactiveInterval()
public void setMaxInactiveInterval(int interval)
interval - The new default valuepublic void add(Session session)
session - Session to be addedpublic Session createEmptySession()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to addpublic Session createSession()
null.
java.lang.IllegalStateException - if a new session cannot be
instantiated for any reason
public Session findSession(java.lang.String id)
throws java.io.IOException
null.
id - The session id for the session to be returned
java.lang.IllegalStateException - if a new session cannot be
instantiated for any reason
java.io.IOException - if an input/output error occurs while
processing this requestpublic Session[] findSessions()
public void load()
throws java.lang.ClassNotFoundException,
java.io.IOException
java.lang.ClassNotFoundException - if a serialized class cannot be
found during the reload
java.io.IOException - if an input/output error occurspublic void remove(Session session)
session - Session to be removedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to remove
public void unload()
throws java.io.IOException
java.io.IOException - if an input/output error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||