Save This Page
Home » jboss-5.0.0.CR1-src » org.jboss.ha.framework » server » util » [javadoc | source]
org.jboss.ha.framework.server.util
public class: TopologyMonitorService [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.ha.framework.server.util.TopologyMonitorService

All Implemented Interfaces:
    org.jboss.ha.framework.interfaces.HAPartition.AsynchHAMembershipListener, TopologyMonitorServiceMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

A cluster parition membership monitor. It can be used to view how the nodes in a cluster are seeing the topology change using either email or a centralized log server. To use this to send email on change notifications use the following log4j.xml fragments: You can also have this service notify another MBean of the change to perform arbitrary checks by specifying the MBean name as the TriggerServiceName attribute value. This MBean must have an operation with the following signature:
param: removed ArrayList of nodes that were removed
param: added ArrayList of nodes that were added
param: members ArrayList of nodes currently in the cluster
param: logLoggerName the log4j category name used by the
TopologyMonitorService. This should be used for logging to integrate with
the TopologyMonitorService output.
public void membershipChanged(ArrayList deadMembers, ArrayList newMembers,
ArrayList allMembers, String logLoggerName)
Nested Class Summary:
public static class  TopologyMonitorService.AddressPort   
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public TopologyMonitorService() 
Method from org.jboss.ha.framework.server.util.TopologyMonitorService Summary:
getClusterNodes,   getPartitionName,   getTriggerServiceName,   membershipChanged,   setPartition,   setPartitionName,   setTriggerServiceName,   startService,   stopService
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ha.framework.server.util.TopologyMonitorService Detail:
 public Vector getClusterNodes() 
 public String getPartitionName() 
 public ObjectName getTriggerServiceName() 
 public  void membershipChanged(Vector deadMembers,
    Vector newMembers,
    Vector allMembers) 
    Called when a new partition topology occurs.
 public  void setPartition(HAPartition partition) 
 public  void setPartitionName(String name) 
 public  void setTriggerServiceName(ObjectName triggerServiceName) 
 protected  void startService() throws Exception 
 protected  void stopService() throws Exception