| org.sakaiproject.event.api.UsageSessionService
All known Subclasses: org.sakaiproject.event.impl.UsageSessionServiceAdaptor,
UsageSessionService | public interface UsageSessionService (Code) | |
UsageSessionService keeps track of usage sessions.
|
Method Summary | |
List | getOpenSessions() Access a list of all open sessions. | Map | getOpenSessionsByServer() Access a list of all open sessions, grouped by server. | UsageSession | getSession() Access the usage session associated with the current request or thread. | UsageSession | getSession(String id) Access a usage session (may be other than the current one) by id.
Parameters: id - the Session id. | String | getSessionId() Access the session id from the usage session associated with the current request or thread, or null if no session. | int | getSessionInactiveTimeout() Access the time (seconds) we will wait for any user generated request from a session before we consider the session inactive. | int | getSessionLostTimeout() Access the time (seconds) we will wait for hearing anyting from a session before we consider the session lost. | SessionState | getSessionState(String key) Access a SessionState object with the given key associated with the current usage session.
Parameters: key - The SessionState key. | List | getSessions(List ids) Access a List of usage sessions by List of ids.
Parameters: ids - the List (String) of Session ids. | List | getSessions(String joinTable, String joinAlias, String joinColumn, String joinCriteria, Object[] values) Access a List of usage sessions by *arbitrary criteria* for te session ids.
Parameters: joinTable - the table name to (inner) join to Parameters: joinAlias - the alias used in the criteria string for the joinTable Parameters: joinColumn - the column name of the joinTable that is to match the session id in the join ON clause Parameters: joinCriteria - the criteria of the select (after the where) Parameters: fields - Optional values to go with the criteria in an implementation specific way. | boolean | login(Authentication authn, HttpServletRequest req) Start a usage session and do any other book-keeping needed to login a user who has already been authenticated.
Parameters: authn - The user authentication. Parameters: req - The servlet request. | void | logout() End a usage session and otherwise cleanup from a login. | UsageSession | setSessionActive(boolean auto) Indicate recent user activity on the current usage session - user initiated or auto. | UsageSession | startSession(String userId, String remoteAddress, String userAgent) Establish a usage session associated with the current request or thread.
Parameters: userId - The user id. Parameters: remoteAddress - The IP address from the user is making a request. Parameters: userAgent - The string describing the user's browser. |
EVENT_LOGIN | final public static String EVENT_LOGIN(Code) | | Name for the event of logging in.
|
EVENT_LOGOUT | final public static String EVENT_LOGOUT(Code) | | Name for the event of logging out.
|
SAKAI_SESSION_COOKIE | final public static String SAKAI_SESSION_COOKIE(Code) | | Name for the global cookie to store the session
|
USAGE_SESSION_KEY | final public static String USAGE_SESSION_KEY(Code) | | Name for the session key to retrieve the UsageSession.
Note: This must be a constant and not based on classname - it must stay the same regardless of the name of the implementing class.
|
getOpenSessions | List getOpenSessions()(Code) | | Access a list of all open sessions.
a List (UsageSession) of all open sessions, ordered by server, then by start (asc) |
getOpenSessionsByServer | Map getOpenSessionsByServer()(Code) | | Access a list of all open sessions, grouped by server.
a Map (server id -> List (UsageSession)) of all open sessions, ordered by server, then by start (asc) |
getSession | UsageSession getSession()(Code) | | Access the usage session associated with the current request or thread.
The UsageSession object holding the information about this session. |
getSession | UsageSession getSession(String id)(Code) | | Access a usage session (may be other than the current one) by id.
Parameters: id - the Session id. The UsageSession object for this id, or null if not defined. |
getSessionId | String getSessionId()(Code) | | Access the session id from the usage session associated with the current request or thread, or null if no session.
The session id from the usage session associated with the current request or thread, or null if no session. |
getSessionInactiveTimeout | int getSessionInactiveTimeout()(Code) | | Access the time (seconds) we will wait for any user generated request from a session before we consider the session inactive.
the time (seconds) used for session inactivity detection. |
getSessionLostTimeout | int getSessionLostTimeout()(Code) | | Access the time (seconds) we will wait for hearing anyting from a session before we consider the session lost.
the time (seconds) used for lost session detection. |
getSessionState | SessionState getSessionState(String key)(Code) | | Access a SessionState object with the given key associated with the current usage session.
Parameters: key - The SessionState key. an SessionState object with the given key. |
getSessions | List getSessions(List ids)(Code) | | Access a List of usage sessions by List of ids.
Parameters: ids - the List (String) of Session ids. The List (UsageSession) of UsageSession object for these ids. |
getSessions | List getSessions(String joinTable, String joinAlias, String joinColumn, String joinCriteria, Object[] values)(Code) | | Access a List of usage sessions by *arbitrary criteria* for te session ids.
Parameters: joinTable - the table name to (inner) join to Parameters: joinAlias - the alias used in the criteria string for the joinTable Parameters: joinColumn - the column name of the joinTable that is to match the session id in the join ON clause Parameters: joinCriteria - the criteria of the select (after the where) Parameters: fields - Optional values to go with the criteria in an implementation specific way. The List (UsageSession) of UsageSession object for these ids. |
login | boolean login(Authentication authn, HttpServletRequest req)(Code) | | Start a usage session and do any other book-keeping needed to login a user who has already been authenticated.
Parameters: authn - The user authentication. Parameters: req - The servlet request. true if all went well, false if not (may fail if the userId is not a valid User) |
logout | void logout()(Code) | | End a usage session and otherwise cleanup from a login.
|
setSessionActive | UsageSession setSessionActive(boolean auto)(Code) | | Indicate recent user activity on the current usage session - user initiated or auto. Maintains the initiated activity timeout mechanism.
Parameters: auto - if true, activity from an automatic event, otherwise from a user initiated event. The current usage session (may be just closed). |
startSession | UsageSession startSession(String userId, String remoteAddress, String userAgent)(Code) | | Establish a usage session associated with the current request or thread.
Parameters: userId - The user id. Parameters: remoteAddress - The IP address from the user is making a request. Parameters: userAgent - The string describing the user's browser. The new UsageSession, or null if one could not be created. |
|
|