org.objectweb.fractal.jmx.listener
Class BasicListener

java.lang.Object
  extended byorg.objectweb.fractal.jmx.listener.BasicListener
All Implemented Interfaces:
EventListener, NotificationListener

public class BasicListener
extends Object
implements NotificationListener

Provides a simple listener component. An object of this class can be used to receive notifications sent out by standard monitoring services (counter, gauge and string) of the JMX specification. All notifications received will be write to user screen.

Version:
0.1

Constructor Summary
BasicListener()
           
 
Method Summary
 void handleNotification(Notification n, Object handback)
          Invoked when a JMX notification occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicListener

public BasicListener()
Method Detail

handleNotification

public void handleNotification(Notification n,
                               Object handback)
Invoked when a JMX notification occurs. Currently handles monitor notifications sent out by standard monitoring services (counter, gauge and string) of the JMX specification. This listener will print to user screen the following information (part of the received notification):

Specified by:
handleNotification in interface NotificationListener
Parameters:
n - The notification (should be an instance of MonitorNotification).
handback - An opaque object, not used by this simple implementation.
Throws:
ClassCastException - if the received notification is not instance of MonitorNotification.