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.
-
-
Field Summary
Fields Modifier and Type Field Description static String
AT
static String
AUTHENTICATION_TYPE_PROPERTY
static String
GSS_PATTERN_PROPERTY
static String
MAX_SESSIONS_PER_USER
static String
PASSWORD_PATTERN_PROPERTY
static String
SECURITY_DOMAIN_PROPERTY
protected SecurityHelper
securityHelper
-
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
-
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 SecurityHelper securityHelper
-
-
Method Detail
-
setSecurityDomain
public void setSecurityDomain(String domainName)
-
closeSession
public void closeSession(String sessionID) throws InvalidSessionException
- Specified by:
closeSession
in 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:
createSession
in interfaceSessionService
- Throws:
LoginException
SessionServiceException
-
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:
getActiveSessions
in interfaceSessionService
-
getActiveSession
public SessionMetadata getActiveSession(String sessionID)
- Specified by:
getActiveSession
in interfaceSessionService
-
getActiveSessionsCount
public int getActiveSessionsCount() throws SessionServiceException
- Specified by:
getActiveSessionsCount
in interfaceSessionService
- Throws:
SessionServiceException
-
getSessionsLoggedInToVDB
public Collection<SessionMetadata> getSessionsLoggedInToVDB(VDBKey key)
- Specified by:
getSessionsLoggedInToVDB
in interfaceSessionService
-
getSessionsLoggedInToVDB
public Collection<SessionMetadata> getSessionsLoggedInToVDB(VDBKey key, String username)
-
pingServer
public void pingServer(String sessionID) throws InvalidSessionException
- Specified by:
pingServer
in interfaceSessionService
- Throws:
InvalidSessionException
-
terminateSession
public boolean terminateSession(String terminatedSessionID, String adminSessionID)
- Specified by:
terminateSession
in interfaceSessionService
-
validateSession
public SessionMetadata validateSession(String sessionID) throws InvalidSessionException, SessionServiceException
- Specified by:
validateSession
in interfaceSessionService
- Throws:
InvalidSessionException
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(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:
setDqp
in interfaceSessionService
-
getSecurityHelper
public SecurityHelper getSecurityHelper()
- Specified by:
getSecurityHelper
in interfaceSessionService
-
getAuthenticationType
public AuthenticationType getAuthenticationType(String vdbName, String version, String userName) throws LogonException
- Specified by:
getAuthenticationType
in interfaceSessionService
- Throws:
LogonException
-
neogitiateGssLogin
public GSSResult neogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket) throws LoginException, LogonException
- Specified by:
neogitiateGssLogin
in interfaceSessionService
- Throws:
LoginException
LogonException
-
getDefaultAuthenticationType
public AuthenticationType getDefaultAuthenticationType()
- Specified by:
getDefaultAuthenticationType
in interfaceSessionService
-
isTrustAllLocal
public boolean isTrustAllLocal()
-
setTrustAllLocal
public void setTrustAllLocal(boolean trustAllLocal)
-
-