| java.lang.Object org.josso.gateway.session.service.store.AbstractSessionStore org.josso.gateway.session.service.store.MemorySessionStore
All known Subclasses: org.josso.gateway.session.service.store.SerializedSessionStore,
MemorySessionStore | public class MemorySessionStore extends AbstractSessionStore (Code) | | This is a memory based store that uses a Map
This implementation is thread safe.
author: Sebastian Gonzalez Oyuela version: $Id: MemorySessionStore.java 508 2008-02-18 13:32:29Z sgonzalez $ |
Method Summary | |
public void | clear() Remove all Sessions from this Store. | public int | getSize() | public String[] | keys() Return an array containing the session identifiers of all Sessions
currently saved in this Store. | public BaseSession | load(String id) Load and return the BaseSession associated with the specified session
identifier from this Store, without removing it. | public BaseSession[] | loadAll() Return an array of all BaseSessions in this store. | public BaseSession[] | loadByLastAccessTime(Date time) | public BaseSession[] | loadByUsername(String name) Load and return the BaseSession associated with the specified username
from this Store, without removing it. | public BaseSession[] | loadByValid(boolean valid) | public void | remove(String id) Remove the BaseSession with the specified session identifier from
this Store, if present. | public void | save(BaseSession session) Save the specified BaseSession into this Store. |
MemorySessionStore | public MemorySessionStore()(Code) | | |
keys | public String[] keys() throws SSOSessionException(Code) | | Return 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.
|
load | public BaseSession load(String id) throws SSOSessionException(Code) | | Load and return the BaseSession associated with the specified session
identifier from this Store, without removing it. If there is no
such stored BaseSession, return null .
Parameters: id - BaseSession identifier of the session to load |
loadAll | public BaseSession[] loadAll() throws SSOSessionException(Code) | | Return an array of all BaseSessions in this store. If there are not
sessions, then return a zero-length array.
|
loadByUsername | public BaseSession[] loadByUsername(String name) throws SSOSessionException(Code) | | Load and return the BaseSession associated with the specified username
from this Store, without removing it. If there is no
such stored BaseSession, return null .
Parameters: name - username of the session to load |
remove | public void remove(String id) throws SSOSessionException(Code) | | Remove the BaseSession with the specified session identifier from
this Store, if present. If no such BaseSession is present, this method
takes no action.
Parameters: id - BaseSession identifier of the BaseSession to be removed |
save | public void save(BaseSession session) throws SSOSessionException(Code) | | Save the specified BaseSession into this Store. Any previously saved
information for the associated session identifier is replaced.
Parameters: session - BaseSession to be saved |
|
|