Class SessionRegistry
java.lang.Object
com.codename1.backend.security.SessionRegistry
The signed-in sessions of each user, which
sessionManagement().maximumSessions(n) counts, as Spring Security's
SessionRegistryImpl does.
Like Spring's default, it is held in memory by one server: behind a load balancer each instance counts the sessions it served. A session is forgotten when it signs out, or once it has been idle for its timeout.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllSessions(String principal, boolean includeExpiredSessions) Every session ofprincipal, least recently used first, with the expired ones only whenincludeExpiredSessions.getSessionInformation(String sessionId) The session with this id, or null when it is not registered.voidrefreshLastRequest(String sessionId) Notes that the session served a request now.voidregisterNewSession(String sessionId, String principal, int maxInactiveSeconds) Records a sign-in ofprincipalon the sessionsessionId, which times out aftermaxInactiveSeconds(0: never).voidremoveSessionInformation(String sessionId) Forgets the session.
-
Constructor Details
-
SessionRegistry
public SessionRegistry()
-
-
Method Details
-
getAllSessions
Every session ofprincipal, least recently used first, with the expired ones only whenincludeExpiredSessions. -
getSessionInformation
The session with this id, or null when it is not registered. -
registerNewSession
-
refreshLastRequest
Notes that the session served a request now. -
removeSessionInformation
Forgets the session.
-