public interface SpincastSessionManager
SpincastSession.| Modifier and Type | Method and Description |
|---|---|
SpincastSession |
createNewSession()
Creates a new session.
|
SpincastSession |
createSession(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes)
Creates a session from infos, with existing
attributes if any (
null otherwise) |
void |
deleteCurrentSession()
Deletes the current session in the request
context, if any.
|
void |
deleteOldInactiveSession(int sessionMaxInactiveMinutes)
Deletes the deletes that were inactive for too long.
|
void |
deleteSession(String sessionId)
Deletes a saved session.
|
void |
deleteSessionIdOnUser()
Deletes the session id on the user.
|
String |
generateNewSessionId()
Generates a new session id.
|
SpincastSession |
getCurrentSession()
Gets the session of the current user, from the
request context.
|
SpincastSession |
getSavedSession(String sessionId)
Gets a session from the database/data source.
|
void |
saveSession(SpincastSession session)
Save session.
|
void |
saveSessionIdOnUser(String sessionId,
boolean permanent)
Will save the session id to the user (by default using
a cookie).
|
void |
updateModificationDateAndSaveSession(SpincastSession session)
Saves a session, but update its modification date first.
|
String generateNewSessionId()
SpincastSession createNewSession()
SpincastSession createSession(String sessionId, Instant creationDate, Instant modificationDate, JsonObject attributes)
null otherwise)SpincastSession getCurrentSession()
null.SpincastSession getSavedSession(String sessionId)
null if not found.void updateModificationDateAndSaveSession(SpincastSession session)
The session to save must have a session id.
void saveSession(SpincastSession session)
void deleteSession(String sessionId)
void deleteCurrentSession()
void saveSessionIdOnUser(String sessionId, boolean permanent)
permanent - if true, the session id will be kept
when the browser session expires.void deleteSessionIdOnUser()
void deleteOldInactiveSession(int sessionMaxInactiveMinutes)
Copyright © 2018. All rights reserved.