
public.javadoc.org.spincast.plugins.session.SpincastSessionManager.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastSessionManager (org.spincast:spincast-framework 1.7.1 API)
org.spincast.plugins.session
Interface SpincastSessionManager
-
- All Known Implementing Classes:
- SpincastSessionManagerDefault
public interface SpincastSessionManager
Manager for SpincastSession
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods
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.
-
-
Method Detail
-
generateNewSessionId
String generateNewSessionId()
Generates a new session id.
-
createNewSession
SpincastSession createNewSession()
Creates a new session.
-
createSession
SpincastSession createSession(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes)
Creates a session from infos, with existing
attributes if any (null
otherwise)
-
getCurrentSession
SpincastSession getCurrentSession()
Gets the session of the current user, from the
request context. If not in a request context,
returns null
.
-
getSavedSession
SpincastSession getSavedSession(String sessionId)
Gets a session from the database/data source.
- Returns:
- the session or
null
if not found.
-
updateModificationDateAndSaveSession
void updateModificationDateAndSaveSession(SpincastSession session)
Saves a session, but update its modification date first.
The session to save must have a session id.
-
saveSession
void saveSession(SpincastSession session)
Save session.
-
deleteSession
void deleteSession(String sessionId)
Deletes a saved session.
-
deleteCurrentSession
void deleteCurrentSession()
Deletes the current session in the request
context, if any.
-
saveSessionIdOnUser
void saveSessionIdOnUser(String sessionId,
boolean permanent)
Will save the session id to the user (by default using
a cookie).
- Parameters:
permanent
- if true
, the session id will be kept
when the browser session expires.
-
deleteSessionIdOnUser
void deleteSessionIdOnUser()
Deletes the session id on the user. By default, will delete
the session id cookie.
-
deleteOldInactiveSession
void deleteOldInactiveSession(int sessionMaxInactiveMinutes)
Deletes the deletes that were inactive for too long.
This means their last "modification date" must be older than
the specified number of mminutes.
Copyright © 2019. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy