Interface SessionIdManager
- All Superinterfaces:
LifeCycle
- All Known Implementing Classes:
DefaultSessionIdManager
Session ID Manager.
Manages session IDs across multiple contexts.
-
Nested Class Summary
Nested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Method Summary
Modifier and TypeMethodDescriptionvoidExpire all sessions on all contexts that share the same id.getExtendedId(String id, Request request) Get an extended id for a session.Get just the session id from an id that includes the worker name as a suffix.voidinvalidateAll(String id) Invalidate all sessions on all contexts that share the same id.booleannewSessionId(Request request, String requestedId, long created) Create a new Session ID.renewSessionId(String oldId, String oldExtendedId, Request request) Change the existing session id.voidscavenge()voidsetSessionHouseKeeper(HouseKeeper houseKeeper) Set the housekeeper for doing scavenging.Methods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Method Details
-
isIdInUse
- Parameters:
id- The plain session ID (ie no workername extension)- Returns:
- True if the session ID is in use by at least one context.
-
expireAll
Expire all sessions on all contexts that share the same id.- Parameters:
id- The session ID without any cluster node extension
-
invalidateAll
Invalidate all sessions on all contexts that share the same id.- Parameters:
id- the session id
-
newSessionId
-
getWorkerName
String getWorkerName()- Returns:
- the unique name of this server instance
-
getId
-
getExtendedId
-
renewSessionId
-
scavenge
void scavenge() -
setSessionHouseKeeper
Set the housekeeper for doing scavenging.- Parameters:
houseKeeper- the housekeeper for doing scavenging
-
getSessionHouseKeeper
HouseKeeper getSessionHouseKeeper()- Returns:
- the housekeeper for doing scavenging
-