|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.web.tomcat.service.sso.jbc.JBossCacheSSOClusterManager
public final class JBossCacheSSOClusterManager
An implementation of SSOClusterManager that uses a TreeCache to share SSO information between cluster nodes.
Field Summary | |
---|---|
static String |
DEFAULT_CACHE_NAME
The default JBoss Cache to use for storing SSO entries |
static String |
DEFAULT_THREAD_POOL_NAME
Default global value for the threadPoolName property |
static String |
LEGACY_CACHE_NAME
The legacy name of the JBoss Cache to use for storing SSO entries |
Constructor Summary | |
---|---|
JBossCacheSSOClusterManager()
Creates a new JBossCacheSSOClusterManager |
|
JBossCacheSSOClusterManager(MBeanServer server)
Creates a new JBossCacheSSOClusterManager that works with the given MBeanServer. |
Method Summary | |
---|---|
void |
addSession(String ssoId,
org.jboss.web.tomcat.service.sso.spi.FullyQualifiedSessionId sessionId)
Notify the cluster of the addition of a Session to an SSO session. |
String |
getCacheName()
|
int |
getSessionCount(String ssoId)
Gets the number of sessions associated with the given SSO. |
org.jboss.web.tomcat.service.sso.spi.SSOLocalManager |
getSSOLocalManager()
Gets the SingleSignOn valve for which this object is handling cluster communications. |
String |
getThreadPoolName()
|
boolean |
isUsingThreadPool()
|
void |
logout(String ssoId)
Notifies the cluster that a single sign on session has been terminated due to a user logout. |
org.jboss.web.tomcat.service.sso.spi.SSOCredentials |
lookup(String ssoId)
|
void |
nodeModified(org.jboss.cache.notifications.event.NodeModifiedEvent event)
Extracts an SSO session id from the Fqn and uses it in an invocation of ClusteredSingleSignOn.update() . |
void |
nodeRemoved(org.jboss.cache.notifications.event.NodeRemovedEvent event)
Extracts an SSO session id from the Fqn and uses it in an invocation of ClusteredSingleSignOn.deregister(String) . |
void |
register(String ssoId,
String authType,
String username,
String password)
Notifies the cluster of the creation of a new SSO entry. |
void |
removeSession(String ssoId,
org.jboss.web.tomcat.service.sso.spi.FullyQualifiedSessionId sessionId)
Notify the cluster of the removal of a Session from an SSO session. |
void |
setSSOLocalManager(org.jboss.web.tomcat.service.sso.spi.SSOLocalManager localManager)
Sets the SingleSignOn valve for which this object is handling cluster communications. |
void |
start()
Prepare for the beginning of active use of the public methods of this component. |
void |
stop()
Gracefully terminate the active use of the public methods of this component. |
void |
updateCredentials(String ssoId,
String authType,
String username,
String password)
Notifies the cluster of an update of the security credentials associated with an SSO session. |
void |
viewChange(org.jboss.cache.notifications.event.ViewChangedEvent event)
If any nodes have been removed from the view, asynchronously scans all SSOs looking for and removing sessions owned by the removed node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_THREAD_POOL_NAME
public static final String DEFAULT_CACHE_NAME
public static final String LEGACY_CACHE_NAME
Constructor Detail |
---|
public JBossCacheSSOClusterManager()
public JBossCacheSSOClusterManager(MBeanServer server)
Method Detail |
---|
public String getCacheName()
public String getThreadPoolName()
public boolean isUsingThreadPool()
public void addSession(String ssoId, org.jboss.web.tomcat.service.sso.spi.FullyQualifiedSessionId sessionId)
addSession
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
ssoId
- the id of the SSO sessionsessionId
- id of the Session that has been addedpublic org.jboss.web.tomcat.service.sso.spi.SSOLocalManager getSSOLocalManager()
getSSOLocalManager
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
SingleSignOn
valve.public void setSSOLocalManager(org.jboss.web.tomcat.service.sso.spi.SSOLocalManager localManager)
NOTE: This method must be called before calls can be made to the other methods of this interface.
setSSOLocalManager
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
localManager
- a SingleSignOn
valve.public void logout(String ssoId)
logout
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
ssoId
- public org.jboss.web.tomcat.service.sso.spi.SSOCredentials lookup(String ssoId)
lookup
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
public void register(String ssoId, String authType, String username, String password)
register
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
ssoId
- the id of the SSO sessionauthType
- the type of authenticator (BASIC, CLIENT-CERT, DIGEST
or FORM) used to authenticate the SSO.username
- the username (if any) used for the authenticationpassword
- the password (if any) used for the authenticationpublic void removeSession(String ssoId, org.jboss.web.tomcat.service.sso.spi.FullyQualifiedSessionId sessionId)
removeSession
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
ssoId
- the id of the SSO sessionsessionId
- id of the Session that has been removedpublic void updateCredentials(String ssoId, String authType, String username, String password)
updateCredentials
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
ssoId
- the id of the SSO sessionauthType
- the type of authenticator (BASIC, CLIENT-CERT, DIGEST
or FORM) used to authenticate the SSO.username
- the username (if any) used for the authenticationpassword
- the password (if any) used for the authenticationpublic void nodeRemoved(org.jboss.cache.notifications.event.NodeRemovedEvent event)
ClusteredSingleSignOn.deregister(String)
.
Ignores invocations resulting from TreeCache changes originated by
this object.
fqn
- the fully-qualified name of the node that was removedpublic void viewChange(org.jboss.cache.notifications.event.ViewChangedEvent event)
public void nodeModified(org.jboss.cache.notifications.event.NodeModifiedEvent event)
ClusteredSingleSignOn.update()
.
Only responds to modifications of nodes whose FQN's final segment is
"credentials".
Ignores invocations resulting from TreeCache changes originated by
this object.
Ignores invocations for SSO session id's that are not registered
with the local SingleSignOn valve.
fqn
- the fully-qualified name of the node that was modifiedpublic void start() throws Exception
start
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
LifecycleException
- if this component detects a fatal error
that prevents this component from being used
Exception
public void stop() throws Exception
stop
in interface org.jboss.web.tomcat.service.sso.spi.SSOClusterManager
LifecycleException
- if this component detects a fatal error
that needs to be reported
Exception
public int getSessionCount(String ssoId) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |