|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jrun.servlet.session.FileSessionStorage
Provide session storage to the file system. This is the default session storage provider for JRun. Each session object (given as a binary stream) is written to a file named with the session ID.
This session storage provider is also given as a fully working
example to illustrate how to create a custom storage provider. The
source code can be found in the samples server within
SERVER-INF/lib/jrun/samples/session
| Field Summary | |
static java.lang.String |
EXT
|
static java.lang.String |
PREFIX
|
| Constructor Summary | |
FileSessionStorage()
|
|
| Method Summary | |
void |
destroy()
Destroy the service. |
protected java.lang.String |
getFilename(java.lang.String id)
|
void |
init(java.util.Properties props)
Initialize the FileSessionStorage provider. |
void |
purge()
Gives the storage provider an opportunity to perform housekeeping. |
void |
remove(java.lang.String id)
Removes the session data for the given session ID |
java.io.InputStream |
retrieve(java.lang.String id)
Retrieves the session data for the given session ID. |
void |
store(java.lang.String id,
java.io.InputStream in,
int len)
Stores the given session data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String PREFIX
public static final java.lang.String EXT
| Constructor Detail |
public FileSessionStorage()
| Method Detail |
public void init(java.util.Properties props)
throws java.io.IOException
Initialize the FileSessionStorage provider. Valid properties are:
init in interface SessionStoragejrun.servlet.session.SessionStorageinitConfigs - A List containing the InitConfigMetaData objects for persistence configurationpublic void destroy()
SessionStoragedestroy in interface SessionStorage
public void store(java.lang.String id,
java.io.InputStream in,
int len)
throws java.io.IOException
SessionStoragestore in interface SessionStoragejrun.servlet.session.SessionStorageid - The session IDin - InputStream containing the session datalen - The length of the session data
public java.io.InputStream retrieve(java.lang.String id)
throws java.io.IOException
SessionStorageretrieve in interface SessionStoragejrun.servlet.session.SessionStorageid - The session ID
public void remove(java.lang.String id)
throws java.io.IOException
SessionStorageremove in interface SessionStoragejrun.servlet.session.SessionStorageid - The session ID
public void purge()
throws java.lang.Exception
SessionStoragepurge in interface SessionStorageprotected java.lang.String getFilename(java.lang.String id)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||