public interface SessionService
SessionData
.Modifier and Type | Method and Description |
---|---|
long |
activeSessionsCount()
Returns a number of active sessions, i.e.
|
void |
endSession(String sessionId)
Mark a session as complete.
|
String |
getSessionData(String sessionId) |
long |
getSessionElapsedTime(String sessionId)
Get the session elapsed time
|
long |
getSessionEndTime(String sessionId)
Get the session end time
|
long |
getSessionStartTime(String sessionId)
Get the session start time
|
Iterator<String> |
sessionIdIterator()
Iterate sessions.
|
void |
setSessionData(String sessionId,
String data)
Update or set the persistable data associated with a session
|
String |
startSession(String data)
Starts a new session, persisting the given data and giving back a unique session ID.
|
String startSession(String data)
data
- any persistable session data (null allowed)IllegalStateException
- if the session has already been startedvoid endSession(String sessionId)
sessionId
- the unique session IDIllegalStateException
- if the session has already been endedRuntimeException
- if the session ID is invalidvoid setSessionData(String sessionId, String data)
sessionId
- the unique session IDdata
- any persistable session data (null allowed)RuntimeException
- if the session ID is invalidString getSessionData(String sessionId)
sessionId
- the unique session IDRuntimeException
- if the session ID is invalidlong getSessionStartTime(String sessionId)
sessionId
- the unique session IDRuntimeException
- if the session ID is invalidlong getSessionEndTime(String sessionId)
sessionId
- the unique session IDRuntimeException
- if the session ID is invalidlong getSessionElapsedTime(String sessionId)
sessionId
- the unique session IDRuntimeException
- if the session ID is invalidlong activeSessionsCount()
Copyright © 2014. All rights reserved.