public class SessionServiceImpl extends Object implements SessionService
Modifier and Type | Field and Description |
---|---|
static String |
AT |
static String |
AUTHENTICATION_TYPE_PROPERTY |
static String |
GSS_PATTERN_PROPERTY |
static String |
PASSWORD_PATTERN_PROPERTY |
static String |
SECURITY_DOMAIN_PROPERTY |
protected SecurityHelper |
securityHelper |
DEFAULT_MAX_SESSIONS, DEFAULT_SESSION_EXPIRATION, MAX_SESSIONS, NAME, SESSION_EXPIRATION
Constructor and Description |
---|
SessionServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
closeSession(String sessionID)
Closes the specified session.
|
SessionMetadata |
createSession(String vdbName,
String vdbVersion,
AuthenticationType authType,
String userName,
Credentials credentials,
String applicationName,
Properties properties)
Create a session for the given user authenticating against the given
Credentials . |
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.
|
protected VDBMetaData |
getActiveVDB(String vdbName,
String vdbVersion) |
AuthenticationType |
getAuthenticationType(String vdbName,
String version,
String userName) |
AuthenticationType |
getDefaultAuthenticationType() |
String |
getSecurityDomain(String userName,
String vdbName,
String version,
VDB vdb) |
SecurityHelper |
getSecurityHelper() |
long |
getSessionExpirationTimeLimit() |
long |
getSessionMaxLimit() |
Collection<SessionMetadata> |
getSessionsLoggedInToVDB(VDBKey key)
Get all Sessions that are in the ACTIVE state
and currently logged in to a VDB.
|
boolean |
isAllowSecurityDomainQualifier() |
boolean |
isTrustAllLocal() |
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 |
setAllowSecurityDomainQualifier(boolean useSecurityDomainQualifier) |
void |
setAuthenticationType(AuthenticationType flag) |
void |
setDqp(DQPCore dqp) |
void |
setSecurityDomain(String domainName) |
void |
setSecurityHelper(SecurityHelper securityHelper) |
void |
setSessionExpirationTimeLimit(long limit) |
void |
setSessionMaxLimit(long limit) |
void |
setTrustAllLocal(boolean trustAllLocal) |
void |
setVDBRepository(VDBRepository repo) |
void |
start() |
void |
stop() |
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.
|
public static final String GSS_PATTERN_PROPERTY
public static final String PASSWORD_PATTERN_PROPERTY
public static final String SECURITY_DOMAIN_PROPERTY
public static final String AUTHENTICATION_TYPE_PROPERTY
public static final String AT
protected SecurityHelper securityHelper
public void setSecurityDomain(String domainName)
public void closeSession(String sessionID) throws InvalidSessionException
SessionService
closeSession
in interface SessionService
InvalidSessionException
public SessionMetadata createSession(String vdbName, String vdbVersion, AuthenticationType authType, String userName, Credentials credentials, String applicationName, Properties properties) throws LoginException, SessionServiceException
SessionService
Credentials
.createSession
in interface SessionService
LoginException
SessionServiceException
protected VDBMetaData getActiveVDB(String vdbName, String vdbVersion) throws SessionServiceException
vdbName
- vdbVersion
- SessionServiceException
- if the version is not valid or the vdb doesn't accept connectionspublic Collection<SessionMetadata> getActiveSessions()
SessionService
getActiveSessions
in interface SessionService
public SessionMetadata getActiveSession(String sessionID)
getActiveSession
in interface SessionService
public int getActiveSessionsCount() throws SessionServiceException
SessionService
getActiveSessionsCount
in interface SessionService
SessionServiceException
public Collection<SessionMetadata> getSessionsLoggedInToVDB(VDBKey key)
SessionService
getSessionsLoggedInToVDB
in interface SessionService
public void pingServer(String sessionID) throws InvalidSessionException
SessionService
pingServer
in interface SessionService
sessionID
- - identifies the clientInvalidSessionException
public boolean terminateSession(String terminatedSessionID, String adminSessionID)
SessionService
terminateSession
in interface SessionService
terminatedSessionID
- The SessionID identifying user's session to be terminatedadminSessionID
- The session id identifying session of administratorpublic SessionMetadata validateSession(String sessionID) throws InvalidSessionException, SessionServiceException
SessionService
validateSession
in interface SessionService
sessionID
- SessionID representing the sessionInvalidSessionException
SessionServiceException
public long getSessionMaxLimit()
public void setSessionMaxLimit(long limit)
public long getSessionExpirationTimeLimit()
public void setSessionExpirationTimeLimit(long limit)
public void setAuthenticationType(AuthenticationType flag)
public void start()
public void stop()
public void setVDBRepository(VDBRepository repo)
public void setSecurityHelper(SecurityHelper securityHelper)
public void setDqp(DQPCore dqp)
setDqp
in interface SessionService
public SecurityHelper getSecurityHelper()
getSecurityHelper
in interface SessionService
public AuthenticationType getAuthenticationType(String vdbName, String version, String userName) throws LogonException
getAuthenticationType
in interface SessionService
LogonException
public String getSecurityDomain(String userName, String vdbName, String version, VDB vdb) throws LoginException
LoginException
public GSSResult neogitiateGssLogin(String user, String vdbName, String vdbVersion, byte[] serviceTicket) throws LoginException, LogonException
neogitiateGssLogin
in interface SessionService
LoginException
LogonException
public AuthenticationType getDefaultAuthenticationType()
getDefaultAuthenticationType
in interface SessionService
public boolean isTrustAllLocal()
public void setTrustAllLocal(boolean trustAllLocal)
public void setAllowSecurityDomainQualifier(boolean useSecurityDomainQualifier)
public boolean isAllowSecurityDomainQualifier()
Copyright © 2018 JBoss by Red Hat. All rights reserved.