com.adventnet.adaptors.snmp
Class SnmpTrapHelper

java.lang.Object
  extended by com.adventnet.adaptors.snmp.SnmpTrapHelper

public class SnmpTrapHelper
extends java.lang.Object

This class acts helps for setting multiple VarBind while Sending Traps.


Field Summary
(package private)  int count
           
(package private)  javax.jmx.openmbean.CompositeData entry
           
(package private)  boolean implementsModelListener
           
(package private)  boolean[] implied
           
(package private)  java.lang.String[] indexNames
           
(package private)  java.lang.Object[] indexValues
           
(package private)  javax.management.MBeanAttributeInfo[] mBeanAttrInfo
           
(package private)  java.lang.String mBeanName
           
(package private)  javax.management.MBeanNotificationInfo[] mBeanNotifInfo
           
(package private)  javax.management.ObjectName mbeanObject
           
(package private)  javax.management.modelmbean.ModelMBeanInfo minfo
           
(package private)  javax.management.modelmbean.ModelMBeanAttributeInfo[] modelMBeanAttrInfo
           
(package private)  javax.management.MBeanServer server
           
(package private)  boolean tabular
           
 
Constructor Summary
SnmpTrapHelper(javax.management.MBeanServer server)
          This constructor takes a MBeanServer reference as a parameter.
 
Method Summary
 SnmpVarBind createVarBind(java.lang.String rowObjectName, java.lang.String tableObjectName, java.lang.String attributeName, javax.management.modelmbean.ModelMBeanInfo mmbi)
          Create a VarBind for the attribute whose MBean is configured as Table in Snmp enabling.
 SnmpVarBind createVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName, javax.management.modelmbean.ModelMBeanInfo minfo, java.lang.Object attributeValue)
          This method is called with the required parameters to create a SnmpVarBind.
 SnmpVarBind createVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName, java.lang.Object attributeValue)
           
 SnmpVarBind createVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName, java.lang.Object[] indexes, javax.management.modelmbean.ModelMBeanInfo minfo, java.lang.Object attributeValue)
           
 SnmpVarBind createVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName, java.lang.Object[] indexes, java.lang.Object attributeValue)
           
 SnmpVarBind getVarBind(java.lang.String mBeanName, java.lang.String columnName, java.lang.Object[] indexes, java.lang.Object value)
           
 SnmpVarBind getVarBind(java.lang.String mBeanName, java.lang.String columnName, java.lang.Object[] indexes, java.lang.Object value, javax.management.modelmbean.ModelMBeanInfo minfo)
          This method is called with the required parameters to create a SnmpVarBind.
 SnmpVarBind getVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName)
           
 SnmpVarBind getVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName, javax.management.modelmbean.ModelMBeanInfo minfo)
          This method is called with the required parameters to create a SnmpVarBind.
 SnmpVarBind getVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName, java.lang.Object[] indexes)
           
 SnmpVarBind getVarBind(java.lang.String mBeanName, java.lang.String scalarOrTableName, java.lang.String columnName, java.lang.Object[] indexes, javax.management.modelmbean.ModelMBeanInfo minfo)
          This method is called with the required parameters to create a SnmpVarBind.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

javax.management.MBeanServer server

mbeanObject

javax.management.ObjectName mbeanObject

minfo

javax.management.modelmbean.ModelMBeanInfo minfo

mBeanAttrInfo

javax.management.MBeanAttributeInfo[] mBeanAttrInfo

modelMBeanAttrInfo

javax.management.modelmbean.ModelMBeanAttributeInfo[] modelMBeanAttrInfo

mBeanNotifInfo

javax.management.MBeanNotificationInfo[] mBeanNotifInfo

tabular

boolean tabular

indexNames

java.lang.String[] indexNames

implied

boolean[] implied

mBeanName

java.lang.String mBeanName

count

int count

entry

javax.jmx.openmbean.CompositeData entry

indexValues

java.lang.Object[] indexValues

implementsModelListener

boolean implementsModelListener
Constructor Detail

SnmpTrapHelper

public SnmpTrapHelper(javax.management.MBeanServer server)
This constructor takes a MBeanServer reference as a parameter. This class is instantiated in the preRegister method of the SnmpAdaptor class.

Parameters:
server - The MBeanServer with which the SnmpTrapHelper is registered.
Method Detail

getVarBind

public SnmpVarBind getVarBind(java.lang.String mBeanName,
                              java.lang.String scalarOrTableName,
                              java.lang.String columnName)

createVarBind

public SnmpVarBind createVarBind(java.lang.String mBeanName,
                                 java.lang.String scalarOrTableName,
                                 java.lang.String columnName,
                                 java.lang.Object attributeValue)

createVarBind

public SnmpVarBind createVarBind(java.lang.String rowObjectName,
                                 java.lang.String tableObjectName,
                                 java.lang.String attributeName,
                                 javax.management.modelmbean.ModelMBeanInfo mmbi)
Create a VarBind for the attribute whose MBean is configured as Table in Snmp enabling.


getVarBind

public SnmpVarBind getVarBind(java.lang.String mBeanName,
                              java.lang.String scalarOrTableName,
                              java.lang.String columnName,
                              javax.management.modelmbean.ModelMBeanInfo minfo)
This method is called with the required parameters to create a SnmpVarBind. This method is called when setting a value for a Scalar or for a default row of a column of a Table.

Parameters:
mBeanName - The Name of the RequiredModelMBean which has the Table/Scalar Group defined in it.
scalarOrTableName - The Name of the Scalar or Table Group which contains the node to be converted into SnmpVarBind.
columnName - The Name of the column for which a SnmpVarBind object has to be formed.
Returns:
a SnmpVarBind object. null when a particular row does not exist.

createVarBind

public SnmpVarBind createVarBind(java.lang.String mBeanName,
                                 java.lang.String scalarOrTableName,
                                 java.lang.String columnName,
                                 javax.management.modelmbean.ModelMBeanInfo minfo,
                                 java.lang.Object attributeValue)
This method is called with the required parameters to create a SnmpVarBind. This method is called when setting a value for a Scalar or for a default row of a column of a Table.

Parameters:
mBeanName - The Name of the RequiredModelMBean which has the Table/Scalar Group defined in it.
scalarOrTableName - The Name of the Scalar or Table Group which contains the node to be converted into SnmpVarBind.
columnName - The Name of the column for which a SnmpVarBind object has to be formed.
Returns:
a SnmpVarBind object. null when a particular row does not exist.

getVarBind

public SnmpVarBind getVarBind(java.lang.String mBeanName,
                              java.lang.String scalarOrTableName,
                              java.lang.String columnName,
                              java.lang.Object[] indexes)

createVarBind

public SnmpVarBind createVarBind(java.lang.String mBeanName,
                                 java.lang.String scalarOrTableName,
                                 java.lang.String columnName,
                                 java.lang.Object[] indexes,
                                 java.lang.Object attributeValue)

getVarBind

public SnmpVarBind getVarBind(java.lang.String mBeanName,
                              java.lang.String scalarOrTableName,
                              java.lang.String columnName,
                              java.lang.Object[] indexes,
                              javax.management.modelmbean.ModelMBeanInfo minfo)
This method is called with the required parameters to create a SnmpVarBind. This method is called when a particular row value of a table has to be set in MutiVarbind.

Parameters:
mBeanName - The Name of the RequiredModelMBean which has the Table/Scalar Group defined in it.
scalarOrTableName - The Name of the Scalar or Table Group which contains the node to be converted into SnmpVarBind.
columnName - The Name of the column which for which a SnmpVarBind object has to be formed.
indexes - The Index Value represents the instance of the column.
Returns:
a SnmpVarBind object. null when a particular row does not exist.

createVarBind

public SnmpVarBind createVarBind(java.lang.String mBeanName,
                                 java.lang.String scalarOrTableName,
                                 java.lang.String columnName,
                                 java.lang.Object[] indexes,
                                 javax.management.modelmbean.ModelMBeanInfo minfo,
                                 java.lang.Object attributeValue)

getVarBind

public SnmpVarBind getVarBind(java.lang.String mBeanName,
                              java.lang.String columnName,
                              java.lang.Object[] indexes,
                              java.lang.Object value)

getVarBind

public SnmpVarBind getVarBind(java.lang.String mBeanName,
                              java.lang.String columnName,
                              java.lang.Object[] indexes,
                              java.lang.Object value,
                              javax.management.modelmbean.ModelMBeanInfo minfo)
This method is called with the required parameters to create a SnmpVarBind. This method is called when setting a value for a Scalar or for a default row of a column of a Table.

Parameters:
mBeanName - The Name of the RequiredModelMBean which has the Table/Scalar Group defined in it.
columnName.The - Name of the column for which a SnmpVarBind object has to be formed.
indexes - the index Values Object[]
value - the value.
Returns:
a SnmpVarBind object. null when a particular row does not exist.