org.opencms.main
Interface I_CmsSessionStorageProvider

All Known Implementing Classes:
CmsDefaultSessionStorageProvider

public interface I_CmsSessionStorageProvider

This interface is used to define the session storage implementation provider.

Since:
6.5.5
Version:
$Revision: 1.6 $
Author:
Michael Moossen

Method Summary
 CmsSessionInfo get(CmsUUID sessionId)
          Returns the stored session info object with the given id.
 java.util.List getAll()
          Returns all current stored session info objects.
 java.util.List getAllOfUser(CmsUUID userId)
          Returns all current stored session info objects for the given user.
 int getSize()
          Returns the current number of stored session info objects.
 void initialize()
          Initializes the storage.
 CmsSessionInfo put(CmsSessionInfo sessionInfo)
          Stores the given session info object.
 CmsSessionInfo remove(CmsUUID sessionId)
          Removes the stored session info object identified by the given session id.
 void shutdown()
          Last cleanup possibility.
 void validate()
          Validates all session info objects removing any session that have became invalidated.
 

Method Detail

validate

void validate()
Validates all session info objects removing any session that have became invalidated.


get

CmsSessionInfo get(CmsUUID sessionId)
Returns the stored session info object with the given id.

Parameters:
sessionId - the id to lookup
Returns:
the stored session info object, or null if not found

getAll

java.util.List getAll()
Returns all current stored session info objects.

Returns:
all current stored session info objects

getAllOfUser

java.util.List getAllOfUser(CmsUUID userId)
Returns all current stored session info objects for the given user.

Parameters:
userId - the id of the user to retrieve the session info objects for
Returns:
all current stored session info objects for the given user

getSize

int getSize()
Returns the current number of stored session info objects.

Returns:
the current number of stored session info objects, or zero if empty

initialize

void initialize()
                throws CmsInitException
Initializes the storage.

Throws:
CmsInitException - if initialization fails

put

CmsSessionInfo put(CmsSessionInfo sessionInfo)
Stores the given session info object.

Parameters:
sessionInfo - the session info object to be stored
Returns:
the session info object previously stored with the same session id, or null if none

remove

CmsSessionInfo remove(CmsUUID sessionId)
Removes the stored session info object identified by the given session id.

Parameters:
sessionId - the id that identifies the stored session info object to remove
Returns:
the removed cached entry or null if none

shutdown

void shutdown()
              throws java.lang.Exception
Last cleanup possibility.

Throws:
java.lang.Exception - if something goes wrong