Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.ha.framework.server.util
Class TopologyMonitorService

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.ha.framework.server.util.TopologyMonitorService

All Implemented Interfaces:
  HAPartition.AsynchHAMembershipListener, HAPartition.HAMembershipListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, TopologyMonitorServiceMBean

public class TopologyMonitorService
extends org.jboss.system.ServiceMBeanSupport
implements TopologyMonitorServiceMBean, HAPartition.AsynchHAMembershipListener

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: logCategoryName 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 logCategoryName)

Version:
  $Revision: 1.3 $
Author:
  Scott.Stark@jboss.org

Nested Class Summary
`static class` | `TopologyMonitorService.AddressPort`

Field Summary

Fields inherited from class org.jboss.system.ServiceMBeanSupport
`log, server, SERVICE_CONTROLLER_SIG, serviceName`

Fields inherited from interface org.jboss.system.ServiceMBean
`CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED`

Constructor Summary
`TopologyMonitorService()`

Method Summary
`Vector` | `getClusterNodes()` Get the current cluster parition membership info
`String` | `getPartitionName()` Get the cluster parition name the mbean is monitoring
`javax.management.ObjectName` | `getTriggerServiceName()` Get the trigger mbean to notify on cluster membership changes
`void` | `membershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers)` Called when a new partition topology occurs.
`void` | `setPartitionName(String name)` Set the cluster parition name the mbean is monitoring
`void` | `setTriggerServiceName(javax.management.ObjectName triggerServiceName)` Set the trigger mbean to notify on cluster membership changes
`protected void` | `startService()`
`protected void` | `stopService()`

Methods inherited from class org.jboss.system.ServiceMBeanSupport
`create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop`

Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
`addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jboss.system.ServiceMBean
`getName, getState, getStateString, jbossInternalLifecycle`

Methods inherited from interface org.jboss.system.Service
`create, destroy, start, stop`

Constructor Detail

### TopologyMonitorService

    public TopologyMonitorService()

Method Detail

### startService

    protected void startService()
                         throws Exception

  Throws:
    `Exception`

### stopService

    protected void stopService()
                        throws Exception

  Throws:
    `Exception`

### getPartitionName

    public String getPartitionName()

  Description copied from interface: `TopologyMonitorServiceMBean`
  Get the cluster parition name the mbean is monitoring

  Specified by:
    `getPartitionName` in interface `TopologyMonitorServiceMBean`

### setPartitionName

    public void setPartitionName(String name)

  Description copied from interface: `TopologyMonitorServiceMBean`
  Set the cluster parition name the mbean is monitoring

  Specified by:
    `setPartitionName` in interface `TopologyMonitorServiceMBean`

### getTriggerServiceName

    public javax.management.ObjectName getTriggerServiceName()

  Description copied from interface: `TopologyMonitorServiceMBean`
  Get the trigger mbean to notify on cluster membership changes

  Specified by:
    `getTriggerServiceName` in interface `TopologyMonitorServiceMBean`

### setTriggerServiceName

    public void setTriggerServiceName(javax.management.ObjectName triggerServiceName)

  Description copied from interface: `TopologyMonitorServiceMBean`
  Set the trigger mbean to notify on cluster membership changes

  Specified by:
    `setTriggerServiceName` in interface `TopologyMonitorServiceMBean`

### getClusterNodes

    public Vector getClusterNodes()

  Description copied from interface: `TopologyMonitorServiceMBean`
  Get the current cluster parition membership info

  Specified by:
    `getClusterNodes` in interface `TopologyMonitorServiceMBean`
  Returns:
    a Vector of org.jgroups.Address implementations, for example, org.jgroups.stack.IpAddress

### membershipChanged

    public void membershipChanged(Vector deadMembers,
                                  Vector newMembers,
                                  Vector allMembers)

  Called when a new partition topology occurs.

  Specified by:
    `membershipChanged` in interface `HAPartition.HAMembershipListener`
  Parameters:
    `deadMembers` - A list of nodes that have died since the previous view
    `newMembers` - A list of nodes that have joined the partition since the previous view
    `allMembers` - A list of nodes that built the current view

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.