|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.util.LifecycleBase org.apache.catalina.session.StoreBase org.apache.catalina.session.FileStore
public final class 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 |
---|
Fields inherited from class org.apache.catalina.session.StoreBase |
---|
manager, sm, support |
Fields inherited from interface org.apache.catalina.Lifecycle |
---|
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT |
Constructor Summary | |
---|---|
FileStore()
|
Method Summary | |
---|---|
void |
clear()
Remove all of the Sessions in this Store. |
String |
getDirectory()
Return the directory path for this Store. |
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. |
String |
getStoreName()
Return the name for this Store, used for logging. |
String |
getThreadName()
Return the thread name for this Store. |
String[] |
keys()
Return an array containing the session identifiers of all Sessions currently saved in this Store. |
Session |
load(String id)
Load and return the Session associated with the specified session identifier from this Store, without removing it. |
void |
remove(String id)
Remove the Session with the specified session identifier from this Store, if present. |
void |
save(Session session)
Save the specified Session into this Store. |
void |
setDirectory(String path)
Set the directory path for this Store. |
Methods inherited from class org.apache.catalina.session.StoreBase |
---|
addPropertyChangeListener, destroyInternal, getManager, initInternal, processExpires, removePropertyChangeListener, setManager, startInternal, stopInternal, toString |
Methods inherited from class org.apache.catalina.util.LifecycleBase |
---|
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileStore()
Method Detail |
---|
public String getDirectory()
public void setDirectory(String path)
path
- The new directory pathpublic String getInfo()
<description>/<version>
.
getInfo
in interface Store
getInfo
in class StoreBase
public String getThreadName()
public String getStoreName()
getStoreName
in class StoreBase
public int getSize() throws IOException
IOException
- if an input/output error occurspublic void clear() throws IOException
IOException
- if an input/output error occurspublic String[] keys() throws IOException
IOException
- if an input/output error occurredpublic Session load(String id) throws ClassNotFoundException, IOException
null
.
id
- Session identifier of the session to load
ClassNotFoundException
- if a deserialization error occurs
IOException
- if an input/output error occurspublic void remove(String id) throws IOException
id
- Session identifier of the Session to be removed
IOException
- if an input/output error occurspublic void save(Session session) throws IOException
session
- Session to be saved
IOException
- if an input/output error occurs
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |