| 
 | ||||||||||
| 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 MetaMatrixSessionIDs 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 SessionServiceInterfacesessionID - The MetaMatrixSessionID identifying user's session
 to be closed
InvalidSessionException - If sessionID identifies an invalid
 session
public MetaMatrixSessionInfo createSession(java.lang.String userName,
                                           Credentials credentials,
                                           java.io.Serializable trustedToken,
                                           java.lang.String applicationName,
                                           java.util.Properties properties)
                                    throws MetaMatrixAuthenticationException,
                                           SessionServiceException
SessionServiceInterfaceCredentials.
createSession in interface SessionServiceInterfaceMetaMatrixAuthenticationException
SessionServiceException
public java.util.Collection<MetaMatrixSessionInfo> getActiveSessions()
                                                              throws SessionServiceException
SessionServiceInterface
getActiveSessions in interface SessionServiceInterfaceSessionServiceException
public int getActiveSessionsCount()
                           throws SessionServiceException
SessionServiceInterface
getActiveSessionsCount in interface SessionServiceInterfaceSessionServiceException
public MetaMatrixPrincipal getPrincipal(MetaMatrixSessionID sessionID)
                                 throws InvalidSessionException,
                                        SessionServiceException
SessionServiceInterface
getPrincipal in interface SessionServiceInterfacesessionID - MetaMatrixSessionID representing the session
InvalidSessionException
SessionServiceException
public java.util.Collection<MetaMatrixSessionInfo> getSessionsLoggedInToVDB(java.lang.String VDBName,
                                                                            java.lang.String VDBVersion)
                                                                     throws SessionServiceException
SessionServiceInterfaceMetaMatrixSessionIDs that are in the ACTIVE state
 and currently logged in to a VDB.
getSessionsLoggedInToVDB in interface SessionServiceInterfaceVDBName - The name of the VDB.VDBVersion - The version of the VDB.
SessionServiceException - when transaction with database fails or unexpected exception happens
public void pingServer(MetaMatrixSessionID sessionID)
                throws InvalidSessionException
SessionServiceInterface
pingServer in interface SessionServiceInterfacesessionID - - identifies the client
InvalidSessionException
public boolean terminateSession(MetaMatrixSessionID terminatedSessionID,
                                MetaMatrixSessionID adminSessionID)
SessionServiceInterface
terminateSession in interface SessionServiceInterfaceterminatedSessionID - The MetaMatrixSessionID identifying user's session
 to be terminatedadminSessionID - The session id identifying session of administrator
public MetaMatrixSessionInfo validateSession(MetaMatrixSessionID sessionID)
                                      throws InvalidSessionException,
                                             SessionServiceException
SessionServiceInterface
validateSession in interface SessionServiceInterfacesessionID - MetaMatrixSessionID representing the session
InvalidSessionException - If sessionID identifies an invalid
 session
SessionServiceExceptionpublic 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 ApplicationServiceprops - Initialialization properties
ApplicationInitializationException - If an error occurs during initialization
public void start(ApplicationEnvironment environment)
           throws ApplicationLifecycleException
ApplicationService
start in interface ApplicationServiceenvironment - Environment
ApplicationLifecycleException - If an error occurs while starting
public void stop()
          throws ApplicationLifecycleException
ApplicationService
stop in interface ApplicationServiceApplicationLifecycleException - 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 | |||||||||