public interface SessionDataAccess
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(Session newSession)
Adds a new session.
|
Session |
getSessionByID(java.lang.String sessionID)
Retrieves the active session with given session ID.
|
Session |
getSessionByUser(java.lang.String userID)
Retrieves the active session of the given user.
|
void |
refreshSession(java.lang.String sessionID,
long newExpiration)
Refreshes the expiration date of the session.
|
void |
removeSession(Session newSession)
Removes a session.
|
void addSession(Session newSession)
newSession - the new Session.Session getSessionByUser(java.lang.String userID)
userID - the identifier of the user.null if none matching the user.Session getSessionByID(java.lang.String sessionID)
sessionID - the identifier of the session.null if none with that ID.void refreshSession(java.lang.String sessionID,
long newExpiration)
sessionID - the ID of the session to refresh.newExpiration - the new expiration date.