|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.catalina.session.FileStore
Concrete implementation of the Store interface that utilizes a file per saved Session in a configured directory. Sessions that are saved are still subject to being expired based on inactivity.
Field Summary | |
protected LifecycleSupport |
lifecycle
The lifecycle event support for this component. |
Fields inherited from interface org.apache.catalina.Lifecycle |
START_EVENT, STOP_EVENT |
Constructor Summary | |
FileStore()
|
Method Summary | |
void |
addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component. |
int |
getCheckInterval()
Return the check interval (in seconds) for this Manager. |
java.lang.String |
getDirectoryPath()
Return the directory path for this Store. |
java.lang.String |
getInfo()
Return descriptive information about this Store implementation and the corresponding version number, in the format <description>/<version> . |
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 |
removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component. |
void |
run()
The background thread that checks for session timeouts and shutdown. |
void |
save(Session session)
Save the specified Session into this Store. |
void |
setCheckInterval(int checkInterval)
Set the check interval (in seconds) for this Manager. |
void |
setDirectoryPath(java.lang.String path)
Set the directory path for this Store. |
void |
start()
Prepare for the beginning of active use of the public methods of this component. |
void |
stop()
Gracefully terminate the active use of the public methods of this component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected LifecycleSupport lifecycle
Constructor Detail |
public FileStore()
Method Detail |
public int getCheckInterval()
public void setCheckInterval(int checkInterval)
checkInterval
- The new check intervalpublic java.lang.String getDirectoryPath()
public void setDirectoryPath(java.lang.String path)
path
- The new directory pathpublic java.lang.String getInfo()
<description>/<version>
.getInfo
in interface Store
public int getSize() throws java.io.IOException
getSize
in interface Store
java.io.IOException
- if an input/output error occurspublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface Store
listener
- The listener to addpublic java.lang.String[] keys() throws java.io.IOException
keys
in interface Store
java.io.IOException
- if an input/output error occurredpublic Session load(java.lang.String id) throws java.lang.ClassNotFoundException, java.io.IOException
null
.load
in interface Store
id
- Session identifier of the session to loadjava.lang.ClassNotFoundException
- if a deserialization error occursjava.io.IOException
- if an input/output error occurspublic void remove(java.lang.String id) throws java.io.IOException
remove
in interface Store
id
- Session identifier of the Session to be removedjava.io.IOException
- if an input/output error occurspublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface Store
listener
- The listener to removepublic void save(Session session) throws java.io.IOException
save
in interface Store
session
- Session to be savedjava.io.IOException
- if an input/output error occurspublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener
in interface Lifecycle
listener
- The listener to addpublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener
in interface Lifecycle
listener
- The listener to addpublic void start() throws LifecycleException
configure()
,
and before any of the public methods of the component are utilized.start
in interface Lifecycle
IllegalStateException
- if this component has already been
startedLifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic void stop() throws LifecycleException
stop
in interface Lifecycle
IllegalStateException
- if this component has not been startedLifecycleException
- if this component detects a fatal error
that needs to be reportedpublic void run()
run
in interface java.lang.Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |