Package org.opennms.netmgt.collectd
Class SnmpIfCollector
- java.lang.Object
-
- org.opennms.netmgt.snmp.CollectionTracker
-
- org.opennms.netmgt.snmp.AggregateTracker
-
- org.opennms.netmgt.collectd.SnmpIfCollector
-
- All Implemented Interfaces:
Collectable,ProxiableTracker
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.
-
-
Constructor Summary
Constructors Constructor Description SnmpIfCollector(java.net.InetAddress address, java.util.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionSetgetCollectionSet()getCollectionSetjava.util.List<SNMPCollectorEntry>getEntries()Returns the list of all entry maps that can be used to access all the information from the service polling.booleanhasData()hasDataprotected voidreportFatalErr(ErrorStatusException ex)protected voidreportGenErr(java.lang.String msg)protected voidreportNonFatalErr(ErrorStatus status)protected voidreportNoSuchNameErr(java.lang.String msg)protected voidreportTooBigErr(java.lang.String msg)protected voidstoreResult(SnmpResult res)java.lang.StringtoString()toString-
Methods inherited from class org.opennms.netmgt.snmp.AggregateTracker
buildNextPdu, getWalkRequests, handleWalkResponses, isFinished, setFailed, setMaxRepetitions, setMaxRetries, setTimedOut
-
Methods inherited from class org.opennms.netmgt.snmp.CollectionTracker
failed, getCollectionTracker, getParent, setFinished, setParent, timedOut
-
-
-
-
Constructor Detail
-
SnmpIfCollector
public SnmpIfCollector(java.net.InetAddress address, java.util.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- aInetAddressobject.objList- TODOcollectionSet- TODO
-
-
Method Detail
-
toString
public java.lang.String toString()
toString
- Overrides:
toStringin classjava.lang.Object- Returns:
- a
Stringobject.
-
getEntries
public java.util.List<SNMPCollectorEntry> getEntries()
Returns the list of all entry maps that can be used to access all the information from the service polling.- Returns:
- a
Listobject.
-
reportGenErr
protected void reportGenErr(java.lang.String msg)
- Overrides:
reportGenErrin classCollectionTracker
-
reportNoSuchNameErr
protected void reportNoSuchNameErr(java.lang.String msg)
- Overrides:
reportNoSuchNameErrin classCollectionTracker
-
reportTooBigErr
protected void reportTooBigErr(java.lang.String msg)
- Overrides:
reportTooBigErrin classCollectionTracker
-
reportFatalErr
protected void reportFatalErr(ErrorStatusException ex)
- Overrides:
reportFatalErrin classCollectionTracker
-
reportNonFatalErr
protected void reportNonFatalErr(ErrorStatus status)
- Overrides:
reportNonFatalErrin classCollectionTracker
-
storeResult
protected void storeResult(SnmpResult res)
- Overrides:
storeResultin classCollectionTracker
-
hasData
public boolean hasData()
hasData
- Returns:
- a boolean.
-
getCollectionSet
public CollectionSet getCollectionSet()
getCollectionSet
- Returns:
- a
CollectionSetobject.
-
-