Class 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.
    • Constructor Detail

      • SessionServiceImpl

        public SessionServiceImpl()
    • Method Detail

      • setSecurityDomain

        public void setSecurityDomain​(String domainName)
      • closeSession

        public void closeSession​(String sessionID)
                          throws org.teiid.client.security.InvalidSessionException
        Specified by:
        closeSession in interface org.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:
        createSession in interface org.teiid.dqp.service.SessionService
        Throws:
        LoginException
        org.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:
        getActiveSessions in interface org.teiid.dqp.service.SessionService
      • getActiveSession

        public org.teiid.adminapi.impl.SessionMetadata getActiveSession​(String sessionID)
        Specified by:
        getActiveSession in interface org.teiid.dqp.service.SessionService
      • getActiveSessionsCount

        public int getActiveSessionsCount()
                                   throws org.teiid.dqp.service.SessionServiceException
        Specified by:
        getActiveSessionsCount in interface org.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:
        getSessionsLoggedInToVDB in interface org.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:
        pingServer in interface org.teiid.dqp.service.SessionService
        Throws:
        org.teiid.client.security.InvalidSessionException
      • terminateSession

        public boolean terminateSession​(String terminatedSessionID,
                                        String adminSessionID)
        Specified by:
        terminateSession in interface org.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:
        validateSession in interface org.teiid.dqp.service.SessionService
        Throws:
        org.teiid.client.security.InvalidSessionException
        org.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:
        setDqp in interface org.teiid.dqp.service.SessionService
      • getSecurityHelper

        public org.teiid.security.SecurityHelper getSecurityHelper()
        Specified by:
        getSecurityHelper in interface org.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:
        getAuthenticationType in interface org.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:
        neogitiateGssLogin in interface org.teiid.dqp.service.SessionService
        Throws:
        LoginException
        org.teiid.client.security.LogonException
      • getDefaultAuthenticationType

        public org.teiid.net.socket.AuthenticationType getDefaultAuthenticationType()
        Specified by:
        getDefaultAuthenticationType in interface org.teiid.dqp.service.SessionService
      • isTrustAllLocal

        public boolean isTrustAllLocal()
      • setTrustAllLocal

        public void setTrustAllLocal​(boolean trustAllLocal)