Interface SessionManager
- All Superinterfaces:
AutoCloseable
An interface for session management.
-
Method Summary
Modifier and TypeMethodDescriptionCreates the specifiedsessionin the session storage.Deletes the specified session from the session storage.Returns whether the session which has the specifiedsessionIdexists.Returns a new session ID.Returns the session which has the specifiedsessionId.Updates the specifiedsessionif 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 specifiedsessionIdexists.- Parameters:
sessionId- the session ID
-
get
Returns the session which has the specifiedsessionId.- Parameters:
sessionId- the session ID
-
create
Creates the specifiedsessionin the session storage.- Parameters:
session- the session to be stored
-
update
Updates the specifiedsessionif 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
-