FileDocCategorySizeDatePackage
Store.javaAPI DocGlassfish v2 API5517Fri May 04 22:31:52 BST 2007org.apache.catalina

Store

public interface Store
A Store is the abstraction of a Catalina component that provides persistent storage and loading of Sessions and their associated user data. Implementations are free to save and load the Sessions to any media they wish, but it is assumed that saved Sessions are persistent across server or context restarts.
author
Craig R. McClanahan
version
$Revision: 1.3 $ $Date: 2007/05/05 05:31:52 $

Fields Summary
Constructors Summary
Methods Summary
public voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component.

param
listener The listener to add

public voidclear()
Remove all Sessions from this Store.

public java.lang.StringgetInfo()
Return descriptive information about this Store implementation and the corresponding version number, in the format <description>/<version>.

public ManagergetManager()
Return the Manager instance associated with this Store.

public intgetSize()
Return the number of Sessions present in this Store.

exception
IOException if an input/output error occurs

public java.lang.String[]keys()
Return an array containing the session identifiers of all Sessions currently saved in this Store. If there are no such Sessions, a zero-length array is returned.

exception
IOException if an input/output error occurred

public Sessionload(java.lang.String id)
Load and return the Session associated with the specified session identifier from this Store, without removing it. If there is no such stored Session, return null.

param
id Session identifier of the session to load
exception
ClassNotFoundException if a deserialization error occurs
exception
IOException if an input/output error occurs

public voidremove(java.lang.String id)
Remove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action.

param
id Session identifier of the Session to be removed
exception
IOException if an input/output error occurs

public voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component.

param
listener The listener to remove

public voidsave(Session session)
Save the specified Session into this Store. Any previously saved information for the associated session identifier is replaced.

param
session Session to be saved
exception
IOException if an input/output error occurs

public voidsetManager(Manager manager)
Set the Manager associated with this Store.

param
manager The Manager which will use this Store.