org.opennms.netmgt.collectd
Class SnmpIfCollector

java.lang.Object
  extended by org.opennms.netmgt.snmp.CollectionTracker
      extended by org.opennms.netmgt.snmp.AggregateTracker
          extended by org.opennms.netmgt.collectd.SnmpIfCollector
All Implemented Interfaces:
Collectable

public class SnmpIfCollector
extends AggregateTracker

The SnmpIfCollector class is responsible for performing the actual SNMP data collection for a node over a specified network interface. The SnmpIfCollector implements the SnmpHandler class in order to receive notifications when an SNMP reply is received or error occurs. The SnmpIfCollector is provided a list of MIB objects to collect and an interface over which to collect the data. Data collection can be via SNMPv1 GetNext requests or SNMPv2 GetBulk requests depending upon the parms used to construct the collector.

Version:
1.1.1.1
Author:
Mike , Jon Whetzel , OpenNMS

Field Summary
 
Fields inherited from class org.opennms.netmgt.snmp.CollectionTracker
GEN_ERR, NO_ERR, NO_SUCH_NAME_ERR, TOO_BIG_ERR
 
Constructor Summary
SnmpIfCollector(InetAddress address, List<SnmpAttributeType> objList, SnmpCollectionSet collectionSet)
          The class constructor is used to initialize the collector and send out the initial SNMP packet requesting data.
 
Method Summary
 CollectionSet getCollectionSet()
           
 List<SNMPCollectorEntry> getEntries()
          Returns the list of all entry maps that can be used to access all the information from the service polling.
 boolean hasData()
           
protected static Category log()
           
protected  void reportGenErr(String msg)
           
protected  void reportNoSuchNameErr(String msg)
           
protected  void reportTooBigErr(String msg)
           
protected  void storeResult(SnmpObjId base, SnmpInstId inst, SnmpValue val)
           
 String toString()
           
 
Methods inherited from class org.opennms.netmgt.snmp.AggregateTracker
buildNextPdu, isFinished, setFailed, setMaxRepititions, setTimedOut
 
Methods inherited from class org.opennms.netmgt.snmp.CollectionTracker
failed, getCollectionTracker, getParent, setParent, timedOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpIfCollector

public SnmpIfCollector(InetAddress address,
                       List<SnmpAttributeType> objList,
                       SnmpCollectionSet collectionSet)
The class constructor is used to initialize the collector and send out the initial SNMP packet requesting data. The data is then received and store by the object. When all the data has been collected the passed signaler object is notified using the notifyAll() method.

Parameters:
address -
objList - TODO
collectionSet - TODO
ifMap - Map of org.opennms.netmgt.poller.collectd.IfInfo objects.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

log

protected static Category log()

getEntries

public List<SNMPCollectorEntry> getEntries()
Returns the list of all entry maps that can be used to access all the information from the service polling.


reportGenErr

protected void reportGenErr(String msg)
Overrides:
reportGenErr in class CollectionTracker

reportNoSuchNameErr

protected void reportNoSuchNameErr(String msg)
Overrides:
reportNoSuchNameErr in class CollectionTracker

reportTooBigErr

protected void reportTooBigErr(String msg)
Overrides:
reportTooBigErr in class CollectionTracker

storeResult

protected void storeResult(SnmpObjId base,
                           SnmpInstId inst,
                           SnmpValue val)
Overrides:
storeResult in class CollectionTracker

hasData

public boolean hasData()

getCollectionSet

public CollectionSet getCollectionSet()


Copyright © 2009. All Rights Reserved.