org.apache.catalina
インタフェース Store

既知の実装クラスの一覧:
StoreBase, FileStore, JDBCStore

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.

バージョン:
$Revision: 1.4 $ $Date: 2001/07/22 20:13:30 $
作成者:
Craig R. McClanahan

メソッドの概要
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener to this component.
 void clear()
          Remove all Sessions from this Store.
 java.lang.String getInfo()
          Return descriptive information about this Store implementation and the corresponding version number, in the format <description>/<version>.
 Manager getManager()
          Return the Manager instance associated with this Store.
 int getSize()
          Return the number of Sessions present in this Store.
 java.lang.String[] keys()
          Return an array containing the session identifiers of all Sessions currently saved in this Store.
 Session load(java.lang.String id)
          Load and return the Session associated with the specified session identifier from this Store, without removing it.
 void remove(java.lang.String id)
          Remove the Session with the specified session identifier from this Store, if present.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a property change listener from this component.
 void save(Session session)
          Save the specified Session into this Store.
 void setManager(Manager manager)
          Set the Manager associated with this Store.
 

メソッドの詳細

getInfo

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

getManager

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

setManager

public void setManager(Manager manager)
Set the Manager associated with this Store.
パラメータ:
manager - The Manager which will use this Store.

getSize

public int getSize()
            throws java.io.IOException
Return the number of Sessions present in this Store.
例外:
java.io.IOException - if an input/output error occurs

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component.
パラメータ:
listener - The listener to add

keys

public java.lang.String[] keys()
                        throws java.io.IOException
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.
例外:
java.io.IOException - if an input/output error occurred

load

public Session load(java.lang.String id)
             throws java.lang.ClassNotFoundException,
                    java.io.IOException
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.
パラメータ:
id - Session identifier of the session to load
例外:
java.lang.ClassNotFoundException - if a deserialization error occurs
java.io.IOException - if an input/output error occurs

remove

public void remove(java.lang.String id)
            throws java.io.IOException
Remove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action.
パラメータ:
id - Session identifier of the Session to be removed
例外:
java.io.IOException - if an input/output error occurs

clear

public void clear()
           throws java.io.IOException
Remove all Sessions from this Store.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component.
パラメータ:
listener - The listener to remove

save

public void save(Session session)
          throws java.io.IOException
Save the specified Session into this Store. Any previously saved information for the associated session identifier is replaced.
パラメータ:
session - Session to be saved
例外:
java.io.IOException - if an input/output error occurs


Copyright ? 2000-2001 Apache Software Foundation. All Rights Reserved.