Method Summary |
|
public boolean | continueSession(String authId) Continues an already active session. |
public long | countSessions() Counts the number of active sessions.
The number of active sessions. exception: SessionManagerException - An undefined number of exceptionalcases or error situations can occur when a session is counted. |
public void | eraseAllSessions() Removes all available sessions. |
public boolean | eraseSession(String authId) Removes all traces of an authentication session. |
public boolean | eraseUserSessions(long userId) Removes all traces of all authentication sessions for a particular
user. |
public boolean | getRestrictHostIp() Obtains the restriction policy of the authentication ID with regards to the
user's host IP. |
public long | getSessionDuration() Obtains the maximum time that a user can stay inactive before an active
session becomes invalid. |
public long | getSessionUserId(String authId) Retrieves the id of a user that has access to a particular session.
Parameters: authId - The unique id of the authentication session for which theuser needs to be looked up. |
public boolean | isSessionValid(String authId, String hostIp) Verifies if a session is valid and still active.
Parameters: authId - The unique id of the authentication session that needs tobe verified. Parameters: hostIp - The ip address of the host from which the user accessesthe application. |
public boolean | listSessions(ListSessions processor) Lists the active sessions.
Parameters: processor - The row processor that will be used to list the activesessions. |
public void | purgeSessions() Removes all sessions that are inactive. |
public void | setRestrictHostIp(boolean flag) Sets the restriction policy of the authentication ID with regards to the
user's host IP. |
public void | setSessionDuration(long milliseconds) Sets the maximum time that a user can stay inactive before an active
session becomes invalid. |
public String | startSession(long userId, String hostIp, boolean remembered) Starts a new session.
Parameters: userId - The id that uniquely identifies the user that is allowedto use this session. Parameters: hostIp - The ip address of the host from which the user accessesthe application. Parameters: remembered - Indicates whether the session is started throughremember me or from scratch. |
public boolean | wasRemembered(String authId) Checks if a session was previously automatically created from remembered
data.
Parameters: authId - The unique id of the authentication session that needs tobe erased. |