Package org.teiid.services
Class SessionServiceImpl
- java.lang.Object
-
- org.teiid.services.SessionServiceImpl
-
- All Implemented Interfaces:
SessionService
public class SessionServiceImpl extends Object implements SessionService
This class serves as the primary implementation of the Session Service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSessionServiceImpl.Authentication
-
Field Summary
Fields Modifier and Type Field Description static StringATstatic StringAUTHENTICATION_TYPE_PROPERTYstatic StringMAX_SESSIONS_PER_USERstatic StringSECURITY_DOMAIN_PROPERTYprotected SecurityHelpersecurityHelper-
Fields inherited from interface org.teiid.dqp.service.SessionService
DEFAULT_MAX_SESSIONS, DEFAULT_SESSION_EXPIRATION, NAME
-
-
Constructor Summary
Constructors Constructor Description SessionServiceImpl()
-
Method Summary
-
-
-
Field Detail
-
SECURITY_DOMAIN_PROPERTY
public static final String SECURITY_DOMAIN_PROPERTY
- See Also:
- Constant Field Values
-
AUTHENTICATION_TYPE_PROPERTY
public static final String AUTHENTICATION_TYPE_PROPERTY
- See Also:
- Constant Field Values
-
MAX_SESSIONS_PER_USER
public static final String MAX_SESSIONS_PER_USER
- See Also:
- Constant Field Values
-
AT
public static final String AT
- See Also:
- Constant Field Values
-
securityHelper
protected SecurityHelper securityHelper
-
-
Method Detail
-
setSecurityDomain
public void setSecurityDomain(String domainName)
-
closeSession
public void closeSession(String sessionID) throws InvalidSessionException
- Specified by:
closeSessionin interfaceSessionService- Throws:
InvalidSessionException
-
createSession
public SessionMetadata createSession(String vdbName, String vdbVersion, AuthenticationType authType, String userName, Credentials credentials, String applicationName, Properties properties) throws LoginException, SessionServiceException
- Specified by:
createSessionin interfaceSessionService- Throws:
LoginExceptionSessionServiceException
-
getActiveVDB
protected VDBMetaData getActiveVDB(String vdbName, String vdbVersion) throws SessionServiceException
- Parameters:
vdbName-vdbVersion-- Returns:
- the vdb or null if it doesn't exist
- Throws:
SessionServiceException- if the version is not valid or the vdb doesn't accept connections
-
getActiveSessions
public Collection<SessionMetadata> getActiveSessions()
- Specified by:
getActiveSessionsin interfaceSessionService
-
getActiveSession
public SessionMetadata getActiveSession(String sessionID)
- Specified by:
getActiveSessionin interfaceSessionService
-
getActiveSessionsCount
public int getActiveSessionsCount() throws SessionServiceException- Specified by:
getActiveSessionsCountin interfaceSessionService- Throws:
SessionServiceException
-
getSessionsLoggedInToVDB
public Collection<SessionMetadata> getSessionsLoggedInToVDB(VDBKey key)
- Specified by:
getSessionsLoggedInToVDBin interfaceSessionService
-
getSessionsLoggedInToVDB
public Collection<SessionMetadata> getSessionsLoggedInToVDB(VDBKey key, String username)
-
pingServer
public void pingServer(String sessionID) throws InvalidSessionException
- Specified by:
pingServerin interfaceSessionService- Throws:
InvalidSessionException
-
terminateSession
public boolean terminateSession(String terminatedSessionID, String adminSessionID)
- Specified by:
terminateSessionin interfaceSessionService
-
validateSession
public SessionMetadata validateSession(String sessionID) throws InvalidSessionException, SessionServiceException
- Specified by:
validateSessionin interfaceSessionService- Throws:
InvalidSessionExceptionSessionServiceException
-
getSessionMaxLimit
public long getSessionMaxLimit()
-
setSessionMaxLimit
public void setSessionMaxLimit(long limit)
-
getSessionExpirationTimeLimit
public long getSessionExpirationTimeLimit()
-
setSessionExpirationTimeLimit
public void setSessionExpirationTimeLimit(long limit)
-
setAuthenticationType
public void setAuthenticationType(AuthenticationType flag)
-
start
public void start()
-
stop
public void stop()
-
setVDBRepository
public void setVDBRepository(VDBRepository repo)
-
setSecurityHelper
public void setSecurityHelper(SecurityHelper securityHelper)
-
setDqp
public void setDqp(DQPCore dqp)
- Specified by:
setDqpin interfaceSessionService
-
getSecurityHelper
public SecurityHelper getSecurityHelper()
- Specified by:
getSecurityHelperin interfaceSessionService
-
getAuthenticationType
public AuthenticationType getAuthenticationType(String vdbName, String version, String userName) throws LogonException
- Specified by:
getAuthenticationTypein interfaceSessionService- Throws:
LogonException
-
neogitiateGssLogin
public GSSResult neogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket) throws LoginException, LogonException
- Specified by:
neogitiateGssLoginin interfaceSessionService- Throws:
LoginExceptionLogonException
-
getDefaultAuthenticationType
public AuthenticationType getDefaultAuthenticationType()
- Specified by:
getDefaultAuthenticationTypein interfaceSessionService
-
isTrustAllLocal
public boolean isTrustAllLocal()
-
setTrustAllLocal
public void setTrustAllLocal(boolean trustAllLocal)
-
-