Home » axis2-1.5-src » org.apache » axis2 » clustering » [javadoc | source]
org.apache.axis2.clustering
public interface: ClusterManager [javadoc | source]

All Implemented Interfaces:
    ParameterInclude

All Known Implementing Classes:
    TribesClusterManager

This is the main interface in the Axis2 clustering implementation. In order to plug-in a new clustering implementation, this interface has to be implemented.

The initilization of a node in the cluster is handled here. It is also responsible for getting this node to join the cluster. This node should not process any Web services requests until it successfully joins the cluster. Generally, this node will also need to obtain the state information and/or configuration information from a neighboring node. This interface is also responsible for properly instantiating a ContextManager & ConfigurationManager . In the case of a static membership scheme, this members are read from the axis2.xml file and added to the ClusterManager.

In the axis2.xml, the instance of this interface is specified using the "cluster" class attribute. e.g. <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager"> specifies that the TribesClusterManager class is the instance of this interface that needs to be used.

There can also be several "parameter" elements, which are children of the "cluster" element in the axis2.xml file. Generally, these parameters will be specific to the ClusterManager implementation.

Method from org.apache.axis2.clustering.ClusterManager Summary:
addLoadBalanceEventHandler,   getConfigurationManager,   getContextManager,   getDomains,   getLoadBalanceEventHandler,   getMembers,   init,   setConfigurationContext,   setConfigurationManager,   setContextManager,   setMembers,   shutdown
Method from org.apache.axis2.clustering.ClusterManager Detail:
 public  void addLoadBalanceEventHandler(LoadBalanceEventHandler eventHandler,
    String applicationDomain)
    Set the load balance event handler which will be notified when load balance events occur. This will be valid only when this node is running in loadBalance mode
 public ConfigurationManager getConfigurationManager()
 public ContextManager getContextManager()
 public Set getDomains()
    Get all the domains that this ClusterManager belongs to
 public LoadBalanceEventHandler getLoadBalanceEventHandler(String applicationDomain)
    Get the LoadBalanceEventHandler which corresponds to the applicationDomain This will be valid only when this node is running in loadBalance mode
 public List getMembers()
 public  void init() throws ClusteringFault
    Initialize this node, and join the cluster
 public  void setConfigurationContext(ConfigurationContext configurationContext)
    Set the system's configuration context. This will be used by the clustering implementations to get information about the Axis2 environment and to correspond with the Axis2 environment
 public  void setConfigurationManager(ConfigurationManager configurationManager)
    Set the ConfigurationManager corresponding to this ClusterManager. This is an optional attribute. We can have a cluster with no configuration management, in which case the configurationManager will be null. This value is set by the org.apache.axis2.deployment.ClusterBuilder , by reading the "configurationManager" element in the axis2.xml

    e.g.

 public  void setContextManager(ContextManager contextManager)
    Set the ContextManager corresponding to this ClusterManager. This is an optional attribute. We can have a cluster with no context replication, in which case the contextManager will be null. This value is set by the org.apache.axis2.deployment.ClusterBuilder , by reading the "contextManager" element in the axis2.xml

    e.g.

 public  void setMembers(List members)
 public  void shutdown() throws ClusteringFault
    Disconnect this node from the cluster. This node will no longer receive membership change notifications, state change messages or configuration change messages. The node will be " "standing alone" once it is shutdown. However, it has to continue to process Web service requests.