net.sf.snmpadaptor4j.core
Class JmxNotificationManager

java.lang.Object
  extended by net.sf.snmpadaptor4j.core.JmxNotificationManager

public class JmxNotificationManager
extends Object

Object responsible of:

Author:
Jean-Philippe MINETTI

Nested Class Summary
protected  class JmxNotificationManager.Listener
          JMX notification listener.
 
Field Summary
protected  Map<ObjectName,JmxNotificationManager.Listener> listenerMap
          Map of JMX notification listener for each registered MBean.
protected  org.apache.log4j.Logger logger
          Logger.
 
Constructor Summary
JmxNotificationManager(SnmpManagers managers, SystemInfo systemInfo)
          Constructor.
 
Method Summary
protected  void handleNotification(SnmpTrapBuilder trapBuilder, Notification notification)
          Handles a JMX notification from an MBean.
 boolean isEnabled()
          Returns TRUE to handle notifications, or FALSE to ignore.
 void setEnabled(boolean enabled)
          Sets TRUE to handle notifications, or FALSE to ignore.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected final org.apache.log4j.Logger logger
Logger.


listenerMap

protected final Map<ObjectName,JmxNotificationManager.Listener> listenerMap
Map of JMX notification listener for each registered MBean.

Constructor Detail

JmxNotificationManager

public JmxNotificationManager(SnmpManagers managers,
                              SystemInfo systemInfo)
Constructor.

Parameters:
managers - SNMP managers on the network to which SNMP traps should be sent (must not be NULL).
systemInfo - Informations on the system.
Method Detail

isEnabled

public final boolean isEnabled()
Returns TRUE to handle notifications, or FALSE to ignore.

Returns:
TRUE to handle notifications.

setEnabled

public void setEnabled(boolean enabled)
Sets TRUE to handle notifications, or FALSE to ignore.

Parameters:
enabled - TRUE to handle notifications.

handleNotification

protected final void handleNotification(SnmpTrapBuilder trapBuilder,
                                        Notification notification)
Handles a JMX notification from an MBean.

Parameters:
trapBuilder - Builder of SNMP traps from JMX notifications for an MBean.
notification - JMX notification.

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2012-2013 snmpAdaptor4j. All Rights Reserved.