OpenNMS API 1.2.3

org.opennms.netmgt.collectd
Class SNMPCollectorEntry

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.TreeMap
          extended byorg.opennms.netmgt.collectd.SNMPCollectorEntry
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable, java.util.SortedMap

public final class SNMPCollectorEntry
extends java.util.TreeMap

The SNMPCollectorEntry class is designed to hold all SNMP collected data pertaining to a particular interface.

An instance of this class is created by calling the constructor and passing a list of SnmpVarBind objects from an SNMP PDU response. This class extends java.util.TreeMap which is used to store each of the collected data points indexed by object identifier.

Author:
Jon Whetzel , Mike Davidson
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.TreeMap
 
Nested classes inherited from class java.util.AbstractMap
 
Field Summary
static java.lang.String IF_INDEX
          Key that will be used in the map for returning the ifIndex of particular interface.
private  java.util.List m_objList
          The list of MIBObjects that will used for associating the the data within the map.
 
Fields inherited from class java.util.TreeMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
SNMPCollectorEntry()
           Creates a default instance of the SNMPCollector entry map.
SNMPCollectorEntry(SnmpVarBind[] vars, java.util.List objList, java.lang.String ifIndex)
           The class constructor used to initialize the object to its initial state.
 
Method Summary
 void update(SnmpVarBind[] vars, java.lang.String ifIndex)
           This method is used to update this entry's map with the current information from the agent.
 
Methods inherited from class java.util.TreeMap
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Field Detail

m_objList

private java.util.List m_objList
The list of MIBObjects that will used for associating the the data within the map.


IF_INDEX

public static final java.lang.String IF_INDEX
Key that will be used in the map for returning the ifIndex of particular interface.

See Also:
Constant Field Values
Constructor Detail

SNMPCollectorEntry

public SNMPCollectorEntry()

Creates a default instance of the SNMPCollector entry map. The map represents a singular instance from the MibObject. Each column in the table for the loaded instance may be retrieved through its OID from the MIBObject.

The initial table is constructed with zero elements in the map.


SNMPCollectorEntry

public SNMPCollectorEntry(SnmpVarBind[] vars,
                          java.util.List objList,
                          java.lang.String ifIndex)

The class constructor used to initialize the object to its initial state. Although the object's member variables can change after an instance is created, this constructor will initialize all the variables as per their named variable from the passed array of SNMP varbinds.

If the information in the object should not be modified then a final modifier can be applied to the created object.

Parameters:
vars - The array of collected SNMP variable bindings
objList - List of MibObject objects representing each of of the oid's configured for collection.
ifIndex - The ifIndex (as a String) of the interface for which the collected SNMP data is relevant. NOTE: NULL if the collected SNMP data is for the node.
Method Detail

update

public void update(SnmpVarBind[] vars,
                   java.lang.String ifIndex)

This method is used to update this entry's map with the current information from the agent.

This does not clear out any column in the actual row that does not have a definition.

Parameters:
vars - Array of SnmpVarBind objects containing all the SNMP data collected for a particular interface.
ifIndex - The ifIndex (as a String) of the interface for which the collected SNMP data is relevant.

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.