org.jboss.ejb3.proxy.clustered.registry
Class ProxyClusteringRegistry

java.lang.Object
  extended by org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry
All Implemented Interfaces:
org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener

public class ProxyClusteringRegistry
extends Object
implements org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener

Registry for clustering information about clustered containers.

Version:
$Revision: $
Author:
Brian Stansberry

Constructor Summary
ProxyClusteringRegistry()
           
 
Method Summary
 ProxyClusteringInfo getBeanClusteringInfo(String proxyFactoryKey)
           
 ClusterFamilyNamePolicy<org.jboss.remoting.InvokerLocator> getClusterFamilyNamePolicy()
           
 Map<String,org.jboss.ha.framework.server.HATarget> getHATargets(String containerName)
          Gets a map of all HATargets associated with the given container, keyed by the cluster family name associated with the target.
 Map<String,Class<org.jboss.ha.client.loadbalance.LoadBalancePolicy>> getLoadBalancePolicies()
           
static String getPartitionName(org.jboss.metadata.ejb.jboss.ClusterConfigMetaData metadata)
           
 ProxyClusteringInfo registerClusteredBean(String containerName, String proxyFactoryName, org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata, org.jboss.remoting.InvokerLocator locator)
           
 void registerListener(ProxyClusteringRegistryListener listener)
           
 void replicantsChanged(String key, List newReplicants, int newReplicantsViewId, boolean merge)
          Updates the FamilyWrapper identified by key and notifies any ProxyClusteringRegistryListeners of a topology change.
 void setClusterFamilyNamePolicy(ClusterFamilyNamePolicy<org.jboss.remoting.InvokerLocator> clusterFamilyNamePolicy)
           
 void setLoadBalancePolicies(Map<String,Class<org.jboss.ha.client.loadbalance.LoadBalancePolicy>> loadBalancePolicies)
           
 void unregisterClusteredBean(ProxyClusteringInfo info)
           
 void unregisterListener(ProxyClusteringRegistryListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyClusteringRegistry

public ProxyClusteringRegistry()
Method Detail

registerListener

public void registerListener(ProxyClusteringRegistryListener listener)

unregisterListener

public void unregisterListener(ProxyClusteringRegistryListener listener)

registerClusteredBean

public ProxyClusteringInfo registerClusteredBean(String containerName,
                                                 String proxyFactoryName,
                                                 org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata,
                                                 org.jboss.remoting.InvokerLocator locator)
                                          throws Exception
Throws:
Exception

unregisterClusteredBean

public void unregisterClusteredBean(ProxyClusteringInfo info)

getBeanClusteringInfo

public ProxyClusteringInfo getBeanClusteringInfo(String proxyFactoryKey)

getHATargets

public Map<String,org.jboss.ha.framework.server.HATarget> getHATargets(String containerName)
Gets a map of all HATargets associated with the given container, keyed by the cluster family name associated with the target.

This method is exposed for use by ReplicantsManagerInterceptorFactory in ejb3-core.

Parameters:
containerName - the name of the container
Returns:
Map or null if none are registered

replicantsChanged

public void replicantsChanged(String key,
                              List newReplicants,
                              int newReplicantsViewId,
                              boolean merge)
Updates the FamilyWrapper identified by key and notifies any ProxyClusteringRegistryListeners of a topology change.

Specified by:
replicantsChanged in interface org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener

getClusterFamilyNamePolicy

public ClusterFamilyNamePolicy<org.jboss.remoting.InvokerLocator> getClusterFamilyNamePolicy()

setClusterFamilyNamePolicy

public void setClusterFamilyNamePolicy(ClusterFamilyNamePolicy<org.jboss.remoting.InvokerLocator> clusterFamilyNamePolicy)

getLoadBalancePolicies

public Map<String,Class<org.jboss.ha.client.loadbalance.LoadBalancePolicy>> getLoadBalancePolicies()

setLoadBalancePolicies

public void setLoadBalancePolicies(Map<String,Class<org.jboss.ha.client.loadbalance.LoadBalancePolicy>> loadBalancePolicies)

getPartitionName

public static String getPartitionName(org.jboss.metadata.ejb.jboss.ClusterConfigMetaData metadata)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.