Package org.teiid.services
Class SessionServiceImpl
- java.lang.Object
-
- org.teiid.services.SessionServiceImpl
-
- All Implemented Interfaces:
org.teiid.dqp.service.SessionService
public class SessionServiceImpl extends Object implements org.teiid.dqp.service.SessionService
This class serves as the primary implementation of the Session Service.
-
-
Field Summary
Fields Modifier and Type Field Description static StringATstatic StringAUTHENTICATION_TYPE_PROPERTYstatic StringGSS_PATTERN_PROPERTYstatic StringMAX_SESSIONS_PER_USERstatic StringPASSWORD_PATTERN_PROPERTYstatic StringSECURITY_DOMAIN_PROPERTYprotected org.teiid.security.SecurityHelpersecurityHelper
-
Constructor Summary
Constructors Constructor Description SessionServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseSession(String sessionID)org.teiid.adminapi.impl.SessionMetadatacreateSession(String vdbName, String vdbVersion, org.teiid.net.socket.AuthenticationType authType, String userName, org.teiid.security.Credentials credentials, String applicationName, Properties properties)org.teiid.adminapi.impl.SessionMetadatagetActiveSession(String sessionID)Collection<org.teiid.adminapi.impl.SessionMetadata>getActiveSessions()intgetActiveSessionsCount()protected org.teiid.adminapi.impl.VDBMetaDatagetActiveVDB(String vdbName, String vdbVersion)org.teiid.net.socket.AuthenticationTypegetAuthenticationType(String vdbName, String version, String userName)org.teiid.net.socket.AuthenticationTypegetDefaultAuthenticationType()StringgetSecurityDomain(String vdbName, String version, org.teiid.adminapi.VDB vdb)org.teiid.security.SecurityHelpergetSecurityHelper()longgetSessionExpirationTimeLimit()longgetSessionMaxLimit()Collection<org.teiid.adminapi.impl.SessionMetadata>getSessionsLoggedInToVDB(org.teiid.vdb.runtime.VDBKey key)Collection<org.teiid.adminapi.impl.SessionMetadata>getSessionsLoggedInToVDB(org.teiid.vdb.runtime.VDBKey key, String username)booleanisTrustAllLocal()org.teiid.security.GSSResultneogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket)voidpingServer(String sessionID)voidsetAuthenticationType(org.teiid.net.socket.AuthenticationType flag)voidsetDqp(org.teiid.dqp.internal.process.DQPCore dqp)voidsetSecurityDomain(String domainName)voidsetSecurityHelper(org.teiid.security.SecurityHelper securityHelper)voidsetSessionExpirationTimeLimit(long limit)voidsetSessionMaxLimit(long limit)voidsetTrustAllLocal(boolean trustAllLocal)voidsetVDBRepository(VDBRepository repo)voidstart()voidstop()booleanterminateSession(String terminatedSessionID, String adminSessionID)org.teiid.adminapi.impl.SessionMetadatavalidateSession(String sessionID)
-
-
-
Field Detail
-
GSS_PATTERN_PROPERTY
public static final String GSS_PATTERN_PROPERTY
- See Also:
- Constant Field Values
-
PASSWORD_PATTERN_PROPERTY
public static final String PASSWORD_PATTERN_PROPERTY
- See Also:
- Constant Field Values
-
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 org.teiid.security.SecurityHelper securityHelper
-
-
Method Detail
-
setSecurityDomain
public void setSecurityDomain(String domainName)
-
closeSession
public void closeSession(String sessionID) throws org.teiid.client.security.InvalidSessionException
- Specified by:
closeSessionin interfaceorg.teiid.dqp.service.SessionService- Throws:
org.teiid.client.security.InvalidSessionException
-
createSession
public org.teiid.adminapi.impl.SessionMetadata createSession(String vdbName, String vdbVersion, org.teiid.net.socket.AuthenticationType authType, String userName, org.teiid.security.Credentials credentials, String applicationName, Properties properties) throws LoginException, org.teiid.dqp.service.SessionServiceException
- Specified by:
createSessionin interfaceorg.teiid.dqp.service.SessionService- Throws:
LoginExceptionorg.teiid.dqp.service.SessionServiceException
-
getActiveVDB
protected org.teiid.adminapi.impl.VDBMetaData getActiveVDB(String vdbName, String vdbVersion) throws org.teiid.dqp.service.SessionServiceException
- Parameters:
vdbName-vdbVersion-- Returns:
- the vdb or null if it doesn't exist
- Throws:
org.teiid.dqp.service.SessionServiceException- if the version is not valid or the vdb doesn't accept connections
-
getActiveSessions
public Collection<org.teiid.adminapi.impl.SessionMetadata> getActiveSessions()
- Specified by:
getActiveSessionsin interfaceorg.teiid.dqp.service.SessionService
-
getActiveSession
public org.teiid.adminapi.impl.SessionMetadata getActiveSession(String sessionID)
- Specified by:
getActiveSessionin interfaceorg.teiid.dqp.service.SessionService
-
getActiveSessionsCount
public int getActiveSessionsCount() throws org.teiid.dqp.service.SessionServiceException- Specified by:
getActiveSessionsCountin interfaceorg.teiid.dqp.service.SessionService- Throws:
org.teiid.dqp.service.SessionServiceException
-
getSessionsLoggedInToVDB
public Collection<org.teiid.adminapi.impl.SessionMetadata> getSessionsLoggedInToVDB(org.teiid.vdb.runtime.VDBKey key)
- Specified by:
getSessionsLoggedInToVDBin interfaceorg.teiid.dqp.service.SessionService
-
getSessionsLoggedInToVDB
public Collection<org.teiid.adminapi.impl.SessionMetadata> getSessionsLoggedInToVDB(org.teiid.vdb.runtime.VDBKey key, String username)
-
pingServer
public void pingServer(String sessionID) throws org.teiid.client.security.InvalidSessionException
- Specified by:
pingServerin interfaceorg.teiid.dqp.service.SessionService- Throws:
org.teiid.client.security.InvalidSessionException
-
terminateSession
public boolean terminateSession(String terminatedSessionID, String adminSessionID)
- Specified by:
terminateSessionin interfaceorg.teiid.dqp.service.SessionService
-
validateSession
public org.teiid.adminapi.impl.SessionMetadata validateSession(String sessionID) throws org.teiid.client.security.InvalidSessionException, org.teiid.dqp.service.SessionServiceException
- Specified by:
validateSessionin interfaceorg.teiid.dqp.service.SessionService- Throws:
org.teiid.client.security.InvalidSessionExceptionorg.teiid.dqp.service.SessionServiceException
-
getSessionMaxLimit
public long getSessionMaxLimit()
-
setSessionMaxLimit
public void setSessionMaxLimit(long limit)
-
getSessionExpirationTimeLimit
public long getSessionExpirationTimeLimit()
-
setSessionExpirationTimeLimit
public void setSessionExpirationTimeLimit(long limit)
-
setAuthenticationType
public void setAuthenticationType(org.teiid.net.socket.AuthenticationType flag)
-
start
public void start()
-
stop
public void stop()
-
setVDBRepository
public void setVDBRepository(VDBRepository repo)
-
setSecurityHelper
public void setSecurityHelper(org.teiid.security.SecurityHelper securityHelper)
-
setDqp
public void setDqp(org.teiid.dqp.internal.process.DQPCore dqp)
- Specified by:
setDqpin interfaceorg.teiid.dqp.service.SessionService
-
getSecurityHelper
public org.teiid.security.SecurityHelper getSecurityHelper()
- Specified by:
getSecurityHelperin interfaceorg.teiid.dqp.service.SessionService
-
getAuthenticationType
public org.teiid.net.socket.AuthenticationType getAuthenticationType(String vdbName, String version, String userName) throws org.teiid.client.security.LogonException
- Specified by:
getAuthenticationTypein interfaceorg.teiid.dqp.service.SessionService- Throws:
org.teiid.client.security.LogonException
-
getSecurityDomain
public String getSecurityDomain(String vdbName, String version, org.teiid.adminapi.VDB vdb)
-
neogitiateGssLogin
public org.teiid.security.GSSResult neogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket) throws LoginException, org.teiid.client.security.LogonException
- Specified by:
neogitiateGssLoginin interfaceorg.teiid.dqp.service.SessionService- Throws:
LoginExceptionorg.teiid.client.security.LogonException
-
getDefaultAuthenticationType
public org.teiid.net.socket.AuthenticationType getDefaultAuthenticationType()
- Specified by:
getDefaultAuthenticationTypein interfaceorg.teiid.dqp.service.SessionService
-
isTrustAllLocal
public boolean isTrustAllLocal()
-
setTrustAllLocal
public void setTrustAllLocal(boolean trustAllLocal)
-
-