Interface SessionManager
- All Superinterfaces:
AutoCloseable
An interface for session management.
-
Method Summary
Modifier and TypeMethodDescriptionCreates the specifiedsession
in the session storage.Deletes the specified session from the session storage.Returns whether the session which has the specifiedsessionId
exists.Returns a new session ID.Returns the session which has the specifiedsessionId
.Updates the specifiedsession
if it exists.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
generateSessionId
String generateSessionId()Returns a new session ID. -
exists
Returns whether the session which has the specifiedsessionId
exists.- Parameters:
sessionId
- the session ID
-
get
Returns the session which has the specifiedsessionId
.- Parameters:
sessionId
- the session ID
-
create
Creates the specifiedsession
in the session storage.- Parameters:
session
- the session to be stored
-
update
Updates the specifiedsession
if it exists.- Parameters:
session
- the session to be updated
-
delete
Deletes the specified session from the session storage.- Parameters:
sessionId
- the session ID to be removed
-