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 CollectionSet
getCollectionSet()
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.boolean
hasData()
hasDataprotected void
reportFatalErr(ErrorStatusException ex)
protected void
reportGenErr(java.lang.String msg)
protected void
reportNonFatalErr(ErrorStatus status)
protected void
reportNoSuchNameErr(java.lang.String msg)
protected void
reportTooBigErr(java.lang.String msg)
protected void
storeResult(SnmpResult res)
java.lang.String
toString()
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
- aInetAddress
object.objList
- TODOcollectionSet
- TODO
-
-
Method Detail
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
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
List
object.
-
reportGenErr
protected void reportGenErr(java.lang.String msg)
- Overrides:
reportGenErr
in classCollectionTracker
-
reportNoSuchNameErr
protected void reportNoSuchNameErr(java.lang.String msg)
- Overrides:
reportNoSuchNameErr
in classCollectionTracker
-
reportTooBigErr
protected void reportTooBigErr(java.lang.String msg)
- Overrides:
reportTooBigErr
in classCollectionTracker
-
reportFatalErr
protected void reportFatalErr(ErrorStatusException ex)
- Overrides:
reportFatalErr
in classCollectionTracker
-
reportNonFatalErr
protected void reportNonFatalErr(ErrorStatus status)
- Overrides:
reportNonFatalErr
in classCollectionTracker
-
storeResult
protected void storeResult(SnmpResult res)
- Overrides:
storeResult
in classCollectionTracker
-
hasData
public boolean hasData()
hasData
- Returns:
- a boolean.
-
getCollectionSet
public CollectionSet getCollectionSet()
getCollectionSet
- Returns:
- a
CollectionSet
object.
-
-