org.snmp4j.agent.mo.jmx
Class JMXNotificationSupport

java.lang.Object
  extended by org.snmp4j.agent.mo.jmx.JMXNotificationSupport
All Implemented Interfaces:
java.util.EventListener, javax.management.NotificationListener

public class JMXNotificationSupport
extends java.lang.Object
implements javax.management.NotificationListener

The JMXNotificationSupport receives JMX notifications and forwards them to a NotificationOriginator.

Version:
1.0
Author:
Frank Fock

Constructor Summary
JMXNotificationSupport(org.snmp4j.agent.NotificationOriginator notificationOriginator)
          Creates a JMXNotificationSupport to will use the supplied NotificationOriginator to send SNMP notifications on behalf of JMX notifications.
 
Method Summary
 void add(org.snmp4j.smi.OID notificationID, MBeanNotificationInfo notificationInfo)
          Adds a notification type to this support instance.
 void addAll(java.lang.Object[][] notificationDefinitions)
          Adds all supplied notification types to this support instance.
 void handleNotification(javax.management.Notification notification, java.lang.Object handback)
          Invoked when a JMX notification occurs, this method sends a SNMP notification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXNotificationSupport

public JMXNotificationSupport(org.snmp4j.agent.NotificationOriginator notificationOriginator)
Creates a JMXNotificationSupport to will use the supplied NotificationOriginator to send SNMP notifications on behalf of JMX notifications.

Parameters:
notificationOriginator - a NotificationOriginator instance
Method Detail

add

public void add(org.snmp4j.smi.OID notificationID,
                MBeanNotificationInfo notificationInfo)
Adds a notification type to this support instance.

Parameters:
notificationID - a notification or trap OID.
notificationInfo - a MBeanNotificationInfo instance describing the mapping between JMX and SNMP notification.

addAll

public void addAll(java.lang.Object[][] notificationDefinitions)
Adds all supplied notification types to this support instance.

Parameters:
notificationDefinitions - an array containing zero or more arrays with two elements where the first is a notification or trap OID and the second element is a MBeanNotificationInfo instance describing the mapping between JMX and SNMP notification.

handleNotification

public void handleNotification(javax.management.Notification notification,
                               java.lang.Object handback)
Invoked when a JMX notification occurs, this method sends a SNMP notification

Specified by:
handleNotification in interface javax.management.NotificationListener
Parameters:
notification - The notification.
handback - An opaque object which helps the listener to associate information regarding the MBean emitter. This object is passed to the MBean during the addListener call and resent, without modification, to the listener. The MBean object should not use or modify the object.

Copyright 2006-2007 Frank Fock (SNMP4J.org)