com.adventnet.adaptors.snmp
Class SnmpSupportProvider

java.lang.Object
  extended by com.adventnet.adaptors.snmp.SnmpSupportProvider
All Implemented Interfaces:
java.util.EventListener, javax.management.NotificationListener

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

This class provides SNMP Manageability for Standard and DynamicMBeans registered with the Adaptor. This class takes a xml file named mappings.xml as input.The Standard and Dynamic MBeans are given SNMP Support without registering them as RequiredModelMBean. The mappings.xml file has ObjectName mapping details with the file name of the corresponding xml descriptor.


Constructor Summary
SnmpSupportProvider(javax.management.MBeanServer server, SnmpAdaptor adaptor, java.lang.String mappingFileName)
           
SnmpSupportProvider(SnmpAdaptor adaptor, javax.management.MBeanServer server)
           
 
Method Summary
 void handleNotification(javax.management.Notification notification, java.lang.Object handback)
           
 boolean isTable(javax.management.modelmbean.ModelMBeanInfo minfo)
           
 void register(java.lang.String objName, javax.management.modelmbean.ModelMBeanInfo mmbeanInfo)
           
 void registerClass(java.lang.String className, javax.management.modelmbean.ModelMBeanInfo mmbeanInfo)
           
 void registerClassNameBasedScalar(javax.management.modelmbean.ModelMBeanInfo mmbeanInfo, java.lang.String className)
           
 void registerClassNameBasedTable(javax.management.modelmbean.ModelMBeanInfo mmbeanInfo, java.lang.String className)
           
 void registerObjectNameBasedTable(javax.management.modelmbean.ModelMBeanInfo mmbeanInfo, java.lang.String objName)
           
 void registerWithAgent()
          For each entry in the Hashtable modelMBeanInfoHash a VarBindRequestListenerSupport object is built.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpSupportProvider

public SnmpSupportProvider(SnmpAdaptor adaptor,
                           javax.management.MBeanServer server)

SnmpSupportProvider

public SnmpSupportProvider(javax.management.MBeanServer server,
                           SnmpAdaptor adaptor,
                           java.lang.String mappingFileName)
Method Detail

registerObjectNameBasedTable

public void registerObjectNameBasedTable(javax.management.modelmbean.ModelMBeanInfo mmbeanInfo,
                                         java.lang.String objName)

registerClassNameBasedTable

public void registerClassNameBasedTable(javax.management.modelmbean.ModelMBeanInfo mmbeanInfo,
                                        java.lang.String className)

registerClassNameBasedScalar

public void registerClassNameBasedScalar(javax.management.modelmbean.ModelMBeanInfo mmbeanInfo,
                                         java.lang.String className)

registerWithAgent

public void registerWithAgent()
                       throws java.lang.Exception
For each entry in the Hashtable modelMBeanInfoHash a VarBindRequestListenerSupport object is built. This is then registered with the SnmpAgent by calling the registerModelMBeanImpl method of the SnmpAdaptor with parameter as VarBindRequestListenerSupport.

Throws:
java.lang.Exception

registerClass

public void registerClass(java.lang.String className,
                          javax.management.modelmbean.ModelMBeanInfo mmbeanInfo)

register

public void register(java.lang.String objName,
                     javax.management.modelmbean.ModelMBeanInfo mmbeanInfo)

handleNotification

public void handleNotification(javax.management.Notification notification,
                               java.lang.Object handback)
Specified by:
handleNotification in interface javax.management.NotificationListener

isTable

public boolean isTable(javax.management.modelmbean.ModelMBeanInfo minfo)