|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.platform.security.session.service.SessionServiceImpl
public class SessionServiceImpl
This class serves as the primary implementation of the Session Service.
Field Summary |
---|
Fields inherited from interface com.metamatrix.platform.security.api.service.SessionServiceInterface |
---|
DEFAULT_MAX_SESSIONS, DEFAULT_SESSION_EXPIRATION, MAX_SESSIONS, NAME, SESSION_EXPIRATION |
Constructor Summary | |
---|---|
SessionServiceImpl()
|
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<MetaMatrixSessionInfo> |
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<MetaMatrixSessionInfo> |
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. |
VDBService |
getVdbService()
|
void |
initialize(java.util.Properties props)
Initialize the service with the specified properties. |
void |
pingServer(MetaMatrixSessionID sessionID)
Periodically called by the client to indicate the client is still alive. |
void |
register(SessionListener listener)
Register a session listener |
void |
setDqpCore(org.teiid.dqp.internal.process.DQPCore dqpCore)
|
void |
setMembershipService(MembershipServiceInterface membershipService)
|
void |
setVdbService(VDBService vdbService)
|
void |
start(ApplicationEnvironment environment)
Start the service with the specified environment. |
void |
stop()
Stop the service. |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionServiceImpl()
Method Detail |
---|
public void closeSession(MetaMatrixSessionID sessionID) throws InvalidSessionException
SessionServiceInterface
closeSession
in interface SessionServiceInterface
sessionID
- The MetaMatrixSessionID identifying user's session
to be closed
InvalidSessionException
- If sessionID identifies an invalid
sessionpublic MetaMatrixSessionInfo createSession(java.lang.String userName, Credentials credentials, java.io.Serializable trustedToken, java.lang.String applicationName, java.util.Properties properties) throws MetaMatrixAuthenticationException, SessionServiceException
SessionServiceInterface
Credentials
.
createSession
in interface SessionServiceInterface
MetaMatrixAuthenticationException
SessionServiceException
public java.util.Collection<MetaMatrixSessionInfo> getActiveSessions() throws SessionServiceException
SessionServiceInterface
getActiveSessions
in interface SessionServiceInterface
SessionServiceException
public int getActiveSessionsCount() throws SessionServiceException
SessionServiceInterface
getActiveSessionsCount
in interface SessionServiceInterface
SessionServiceException
public MetaMatrixPrincipal getPrincipal(MetaMatrixSessionID sessionID) throws InvalidSessionException, SessionServiceException
SessionServiceInterface
getPrincipal
in interface SessionServiceInterface
sessionID
- MetaMatrixSessionID representing the session
InvalidSessionException
SessionServiceException
public java.util.Collection<MetaMatrixSessionInfo> getSessionsLoggedInToVDB(java.lang.String VDBName, java.lang.String VDBVersion) throws SessionServiceException
SessionServiceInterface
MetaMatrixSessionID
s that are in the ACTIVE state
and currently logged in to a VDB.
getSessionsLoggedInToVDB
in interface SessionServiceInterface
VDBName
- The name of the VDB.VDBVersion
- The version of the VDB.
SessionServiceException
- when transaction with database fails or unexpected exception happenspublic void pingServer(MetaMatrixSessionID sessionID) throws InvalidSessionException
SessionServiceInterface
pingServer
in interface SessionServiceInterface
sessionID
- - identifies the client
InvalidSessionException
public boolean terminateSession(MetaMatrixSessionID terminatedSessionID, MetaMatrixSessionID adminSessionID)
SessionServiceInterface
terminateSession
in interface SessionServiceInterface
terminatedSessionID
- The MetaMatrixSessionID identifying user's session
to be terminatedadminSessionID
- The session id identifying session of administratorpublic MetaMatrixSessionInfo validateSession(MetaMatrixSessionID sessionID) throws InvalidSessionException, SessionServiceException
SessionServiceInterface
validateSession
in interface SessionServiceInterface
sessionID
- MetaMatrixSessionID representing the session
InvalidSessionException
- If sessionID identifies an invalid
session
SessionServiceException
public void setMembershipService(MembershipServiceInterface membershipService)
public void setDqpCore(org.teiid.dqp.internal.process.DQPCore dqpCore)
public void initialize(java.util.Properties props) throws ApplicationInitializationException
ApplicationService
initialize
in interface ApplicationService
props
- Initialialization properties
ApplicationInitializationException
- If an error occurs during initializationpublic void start(ApplicationEnvironment environment) throws ApplicationLifecycleException
ApplicationService
start
in interface ApplicationService
environment
- Environment
ApplicationLifecycleException
- If an error occurs while startingpublic void stop() throws ApplicationLifecycleException
ApplicationService
stop
in interface ApplicationService
ApplicationLifecycleException
- If an error occurs while startingpublic void setVdbService(VDBService vdbService)
public VDBService getVdbService()
public void register(SessionListener listener)
SessionServiceInterface
register
in interface SessionServiceInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |