Package org.teiid.dqp.service
Interface SessionService
-
- All Known Implementing Classes:
SessionServiceImpl
public interface SessionService
The session service deals with managing sessions; this involves creating sessions, closing sessions, terminating sessions, and updating session state. Note that this service does not deal with authentication explicitly, but may use a membership service provider to authenticate some requests.
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_MAX_SESSIONS
static long
DEFAULT_SESSION_EXPIRATION
static String
NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeSession(String sessionID)
Closes the specified session.SessionMetadata
createSession(String vdbName, String vdbVersion, AuthenticationType authType, String user, Credentials credential, String applicationName, Properties connProps)
Create a session for the given user authenticating against the givenCredentials
.SessionMetadata
getActiveSession(String sessionID)
Collection<SessionMetadata>
getActiveSessions()
Get the collection of active user sessions on the system.int
getActiveSessionsCount()
Get the number of active user sessions on the system.AuthenticationType
getAuthenticationType(String vdbName, String version, String user)
AuthenticationType
getDefaultAuthenticationType()
SecurityHelper
getSecurityHelper()
Collection<SessionMetadata>
getSessionsLoggedInToVDB(VDBKey vdbKey)
Get all Sessions that are in the ACTIVE state and currently logged in to a VDB.GSSResult
neogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket)
void
pingServer(String sessionID)
Periodically called by the client to indicate the client is still alive.void
setDqp(DQPCore dqp)
boolean
terminateSession(String terminatedSessionID, String adminSessionID)
Terminates the specified session.SessionMetadata
validateSession(String 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.
-
-
-
Field Detail
-
NAME
static final String NAME
- See Also:
- Constant Field Values
-
DEFAULT_MAX_SESSIONS
static final long DEFAULT_MAX_SESSIONS
- See Also:
- Constant Field Values
-
DEFAULT_SESSION_EXPIRATION
static final long DEFAULT_SESSION_EXPIRATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
createSession
SessionMetadata createSession(String vdbName, String vdbVersion, AuthenticationType authType, String user, Credentials credential, String applicationName, Properties connProps) throws LoginException, SessionServiceException
Create a session for the given user authenticating against the givenCredentials
.
-
closeSession
void closeSession(String sessionID) throws InvalidSessionException
Closes the specified session.- Throws:
InvalidSessionException
-
terminateSession
boolean terminateSession(String terminatedSessionID, String adminSessionID)
Terminates the specified session. This is an administrative action.- Parameters:
terminatedSessionID
- The SessionID identifying user's session to be terminatedadminSessionID
- The session id identifying session of administrator
-
getActiveSessions
Collection<SessionMetadata> getActiveSessions()
Get the collection of active user sessions on the system.- Returns:
- The collection of Session objects of active users on the system - possibly empty, never null.
-
getActiveSessionsCount
int getActiveSessionsCount() throws SessionServiceException
Get the number of active user sessions on the system.- Returns:
- int
- Throws:
SessionServiceException
-
validateSession
SessionMetadata validateSession(String sessionID) throws InvalidSessionException, SessionServiceException
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.- Parameters:
sessionID
- SessionID representing the session- Returns:
- Session object identifying the session
- Throws:
InvalidSessionException
SessionServiceException
-
getSessionsLoggedInToVDB
Collection<SessionMetadata> getSessionsLoggedInToVDB(VDBKey vdbKey)
Get all Sessions that are in the ACTIVE state and currently logged in to a VDB.- Parameters:
vdbKey
-
-
pingServer
void pingServer(String sessionID) throws InvalidSessionException
Periodically called by the client to indicate the client is still alive.- Parameters:
sessionID
- - identifies the client- Throws:
InvalidSessionException
-
getActiveSession
SessionMetadata getActiveSession(String sessionID)
-
setDqp
void setDqp(DQPCore dqp)
-
getAuthenticationType
AuthenticationType getAuthenticationType(String vdbName, String version, String user) throws LogonException
- Throws:
LogonException
-
getSecurityHelper
SecurityHelper getSecurityHelper()
-
neogitiateGssLogin
GSSResult neogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket) throws LoginException, LogonException
- Throws:
LoginException
LogonException
-
getDefaultAuthenticationType
AuthenticationType getDefaultAuthenticationType()
-
-