## mx4j.tools.heartbeat
Class HeartBeatListener

    java.lang.Object
      mx4j.tools.heartbeat.HeartBeatListener

All Implemented Interfaces:
  HeartBeatListenerControl, HeartBeatListenerMBean

public class HeartBeatListener
extends java.lang.Object
implements HeartBeatListenerMBean, HeartBeatListenerControl

HeartbeatListener supports multiple observers listening to heartbeat from multiple sources.

Version:
  $Revision: 1.9 $

Field Summary

Fields inherited from interface mx4j.tools.heartbeat.HeartBeatListenerMBean
`DEFAULT_LISTENER_NAME`

Fields inherited from interface mx4j.tools.heartbeat.HeartBeatListenerControl
`LOST_HEARTBEAT`

Constructor Summary
`HeartBeatListener(java.lang.String name)`

Method Summary
`javax.management.ObjectName` `getObjectName()`
`void` `processHeartBeat(java.lang.String heartBeatSource)`
`void` `registerObserver(RemoteMBeanServer connector, java.lang.Object connectorType, java.lang.Object address, java.lang.String heartBeatCanonName, javax.management.NotificationListener observer)` Add this listener to a remote heartbeat source and register application to receive heart beat failure notification from HeartBeatListener.
`void` `stop()`
`void` `unregisterObserver(java.lang.String sourceCanonName, javax.management.NotificationListener observer)` Removes the specified heartbeat observer.

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

Constructor Detail

### HeartBeatListener

    public HeartBeatListener(java.lang.String name)

Method Detail

### processHeartBeat

    public void processHeartBeat(java.lang.String heartBeatSource)

  Specified by:
    `processHeartBeat` in interface `HeartBeatListenerMBean`

### getObjectName

    public javax.management.ObjectName getObjectName()

### registerObserver

    public void registerObserver(RemoteMBeanServer connector,
                                 java.lang.Object connectorType,
                                 java.lang.Object address,
                                 java.lang.String heartBeatCanonName,
                                 javax.management.NotificationListener observer)
                          throws javax.management.MalformedObjectNameException,
                                 javax.management.InstanceNotFoundException,
                                 javax.management.MBeanException,
                                 javax.management.ReflectionException,
                                 java.io.IOException

  Add this listener to a remote heartbeat source and register application to receive heart beat failure notification from HeartBeatListener.

  Specified by:
    `registerObserver` in interface `HeartBeatListenerControl`
  Throws:
    `javax.management.MalformedObjectNameException`
    `javax.management.InstanceNotFoundException`
    `javax.management.MBeanException`
    `javax.management.ReflectionException`
    `java.io.IOException`

### unregisterObserver

    public void unregisterObserver(java.lang.String sourceCanonName,
                                   javax.management.NotificationListener observer)

  Removes the specified heartbeat observer.

  Specified by:
    `unregisterObserver` in interface `HeartBeatListenerControl`

### stop

    public void stop()

Copyright © 2001-2003 MX4J Team. All Rights Reserved.