@Singleton
public class SessionStore
extends java.lang.Object
| Constructor | Description |
|---|---|
SessionStore(EventManager eventManager) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(ch.hsr.adv.commons.core.logic.domain.Session newSession) |
Add specified session to the store and set it as current session.
|
void |
clear() |
Clear all sessions
|
boolean |
contains(long sessionId) |
Checks whether the session store contains the given id
|
void |
delete(long id) |
Delete the specified session and fire changeEvent.
|
ch.hsr.adv.commons.core.logic.domain.Session |
get(long sessionId) |
Retuns the session with the given session
|
java.util.List<ch.hsr.adv.commons.core.logic.domain.Session> |
getAll() |
|
ch.hsr.adv.commons.core.logic.domain.Session |
getCurrent() |
Returns the current session
|
void |
setCurrent(long sessionId) |
Sets the current session to the session with the specified id.
|
@Inject public SessionStore(EventManager eventManager)
public void add(ch.hsr.adv.commons.core.logic.domain.Session newSession)
newSession - the session to addpublic java.util.List<ch.hsr.adv.commons.core.logic.domain.Session> getAll()
public ch.hsr.adv.commons.core.logic.domain.Session get(long sessionId)
sessionId - session idpublic ch.hsr.adv.commons.core.logic.domain.Session getCurrent()
public void setCurrent(long sessionId)
sessionId - of the current sessionpublic void delete(long id)
id - to be deletedpublic void clear()
public boolean contains(long sessionId)
sessionId - session id