Top Description Methods
org.apache.catalina

public Interface Store

Known Direct Implementers
org.apache.catalina.session.StoreBase
Imports
java.beans.PropertyChangeListener, java.io.IOException

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

Method Summary

Modifier and TypeMethod and Description
public void
addPropertyChangeListener(PropertyChangeListener
The listener to add
listener
)

Add a property change listener to this component.

public void
clear()

Remove all Sessions from this Store.

public Manager

Returns:

the Manager instance associated with this Store.
getManager
()

public int

Returns:

the number of Sessions present in this Store.
getSize
()

public String[]

Returns:

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.
keys
()

public Session

Returns:

the loaded Session instance
load
(String
Session identifier of the session to load
id
)

Load and return the Session associated with the specified session identifier from this Store, without removing it.

public void
remove(String
Session identifier of the Session to be removed
id
)

Remove the Session with the specified session identifier from this Store, if present.

public void
removePropertyChangeListener(PropertyChangeListener
The listener to remove
listener
)

Remove a property change listener from this component.

public void
save(Session
Session to be saved
session
)

Save the specified Session into this Store.

public void
setManager(Manager
The Manager which will use this Store.
manager
)

Set the Manager associated with this Store.

Method Detail

addPropertyChangeListenerback to summary
public void addPropertyChangeListener(PropertyChangeListener listener)

Add a property change listener to this component.

Parameters
listener:PropertyChangeListener

The listener to add

clearback to summary
public void clear() throws IOException

Remove all Sessions from this Store.

Exceptions
IOException:
if an input/output error occurs
getManagerback to summary
public Manager getManager()
Returns:Manager

the Manager instance associated with this Store.

getSizeback to summary
public int getSize() throws IOException
Returns:int

the number of Sessions present in this Store.

Exceptions
IOException:
if an input/output error occurs
keysback to summary
public String[] keys() throws IOException
Returns:String[]

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.

Exceptions
IOException:
if an input/output error occurred
loadback to summary
public Session load(String id) throws ClassNotFoundException, 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.

Parameters
id:String

Session identifier of the session to load

Returns:Session

the loaded Session instance

Exceptions
ClassNotFoundException:
if a deserialization error occurs
IOException:
if an input/output error occurs
removeback to summary
public void remove(String id) throws 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.

Parameters
id:String

Session identifier of the Session to be removed

Exceptions
IOException:
if an input/output error occurs
removePropertyChangeListenerback to summary
public void removePropertyChangeListener(PropertyChangeListener listener)

Remove a property change listener from this component.

Parameters
listener:PropertyChangeListener

The listener to remove

saveback to summary
public void save(Session session) throws IOException

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

Parameters
session:Session

Session to be saved

Exceptions
IOException:
if an input/output error occurs
setManagerback to summary
public void setManager(Manager manager)

Set the Manager associated with this Store.

Parameters
manager:Manager

The Manager which will use this Store.