public class PlatformSessionServiceImpl extends java.lang.Object implements PlatformSessionService
| Constructor and Description |
|---|
PlatformSessionServiceImpl(PlatformSessionProvider platformSessionProvider,
TechnicalLoggerService logger) |
| Modifier and Type | Method and Description |
|---|---|
SPlatformSession |
createSession(java.lang.String username)
Create a new session for the given user;
|
void |
deleteSession(long sessionId)
Delete a session having the given id
|
long |
getDefaultSessionDuration()
Retrieve the default sessions's duration
|
SPlatformSession |
getSession(long sessionId)
Retrieve a session by its id
|
long |
getSessionsDuration()
Retrieve the duration of new created sessions.
|
boolean |
isValid(long sessionId)
Verify if a session is valid
|
void |
renewSession(long sessionId)
Update the expiration and the last update dates of the session.
|
void |
setSessionDuration(long duration)
Define how long new created sessions will be valid.
|
public PlatformSessionServiceImpl(PlatformSessionProvider platformSessionProvider, TechnicalLoggerService logger)
public SPlatformSession createSession(java.lang.String username) throws SSessionException
PlatformSessionServicecreateSession in interface PlatformSessionServiceusername - user nameSSessionException - if some error arrives while creating the sessionpublic void deleteSession(long sessionId)
throws SSessionNotFoundException
PlatformSessionServicedeleteSession in interface PlatformSessionServicesessionId - the session's idSSessionNotFoundException - if no session exists for the given idpublic boolean isValid(long sessionId)
throws SSessionNotFoundException
PlatformSessionServiceisValid in interface PlatformSessionServicesessionId - the session's idSSessionNotFoundExceptionpublic SPlatformSession getSession(long sessionId) throws SSessionNotFoundException
PlatformSessionServicegetSession in interface PlatformSessionServicesessionId - the session's idSSessionNotFoundException - if no session exists for the given idpublic void setSessionDuration(long duration)
PlatformSessionServicesetSessionDuration in interface PlatformSessionServiceduration - session's durationpublic long getDefaultSessionDuration()
PlatformSessionServicegetDefaultSessionDuration in interface PlatformSessionServicepublic long getSessionsDuration()
PlatformSessionServicegetSessionsDuration in interface PlatformSessionServicepublic void renewSession(long sessionId)
throws SSessionException
PlatformSessionServicerenewSession in interface PlatformSessionServicesessionId - the session's idSSessionException