|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionServiceInterface
The session service deals with managing sessions; this involves creating sessions, closing sessions, terminating sessions, and updating session state.
A session has a timestamp, information about the principal owning the session, and a "state" indicating whether it is actively in use, in use but passivated, or has been rendered invalid by being closed or terminated, or by expiring.
Note that this service does not deal with authentication explicitly, but may use a membership service provider to authenticate some requests.
Field Summary | |
---|---|
static java.lang.String |
NAME
|
Fields inherited from interface com.metamatrix.platform.service.api.ServiceInterface |
---|
WAIT_TO_DIE_TIME |
Method Summary | |
---|---|
void |
closeSession(MetaMatrixSessionID sessionID)
Closes the specified session. |
MetaMatrixSessionInfo |
createSession(java.lang.String userName,
Credentials credentials,
java.io.Serializable trustedToken,
java.lang.String applicationName,
java.util.Properties properties)
Create a session for the given user authenticating against the given Credentials . |
java.util.Collection |
getActiveSessions()
Get the collection of active user sessions on the system. |
int |
getActiveSessionsCount()
Get the number of active user sessions on the system. |
MetaMatrixPrincipal |
getPrincipal(MetaMatrixSessionID sessionID)
Returns a MetaMatrixPrincipal object describing the owner (user) of the indicated session. |
java.util.Collection |
getSessionsLoggedInToVDB(java.lang.String VDBName,
java.lang.String VDBVersion)
Get all MetaMatrixSessionID s that are in the ACTIVE state
and currently logged in to a VDB. |
void |
pingServer(MetaMatrixSessionID sessionID)
Periodically called by the client to indicate the client is still alive. |
boolean |
terminateSession(MetaMatrixSessionID terminatedSessionID,
MetaMatrixSessionID adminSessionID)
Terminates the specified session. |
MetaMatrixSessionInfo |
validateSession(MetaMatrixSessionID sessionID)
This method is intended to verify that the session is valid, and, if need be, set the session in an active state, ready to be used. |
Methods inherited from interface com.metamatrix.platform.service.api.ServiceInterface |
---|
checkState, die, dieNow, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getServiceData, getServiceType, getStartTime, getStateChangeTime, init, isAlive, setInitException, updateState |
Field Detail |
---|
static final java.lang.String NAME
Method Detail |
---|
MetaMatrixSessionInfo createSession(java.lang.String userName, Credentials credentials, java.io.Serializable trustedToken, java.lang.String applicationName, java.util.Properties properties) throws MetaMatrixAuthenticationException, SessionServiceException
Credentials
.
MetaMatrixAuthenticationException
SessionServiceException
void closeSession(MetaMatrixSessionID sessionID) throws InvalidSessionException, SessionServiceException
sessionID
- The MetaMatrixSessionID identifying user's session
to be closed
InvalidSessionException
- If sessionID identifies an invalid
session
SessionServiceException
boolean terminateSession(MetaMatrixSessionID terminatedSessionID, MetaMatrixSessionID adminSessionID) throws InvalidSessionException, AuthorizationException, SessionServiceException
terminatedSessionID
- The MetaMatrixSessionID identifying user's session
to be terminatedadminSessionID
- The session id identifying session of administrator
InvalidSessionException
- If terminatedSessionID identifies an invalid
session
AuthorizationException
- if the caller denoted by adminSessionID
does not have authority to terminate the terminatedSessionID
session
SessionServiceException
java.util.Collection getActiveSessions() throws SessionServiceException
SessionServiceException
int getActiveSessionsCount() throws SessionServiceException
SessionServiceException
MetaMatrixPrincipal getPrincipal(MetaMatrixSessionID sessionID) throws InvalidSessionException, SessionServiceException
sessionID
- MetaMatrixSessionID representing the session
InvalidSessionException
SessionServiceException
MetaMatrixSessionInfo validateSession(MetaMatrixSessionID sessionID) throws InvalidSessionException, SessionServiceException
sessionID
- MetaMatrixSessionID representing the session
InvalidSessionException
- If sessionID identifies an invalid
session
SessionServiceException
java.util.Collection getSessionsLoggedInToVDB(java.lang.String VDBName, java.lang.String VDBVersion) throws SessionServiceException
MetaMatrixSessionID
s that are in the ACTIVE state
and currently logged in to a VDB.
VDBName
- The name of the VDB.VDBVersion
- The version of the VDB.
SessionServiceException
- when transaction with database fails or unexpected exception happensvoid pingServer(MetaMatrixSessionID sessionID) throws InvalidSessionException
sessionID
- - identifies the client
InvalidSessionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |