org.opennms.netmgt.capsd.snmp
Class IfTable

java.lang.Object
  extended by org.opennms.netmgt.snmp.CollectionTracker
      extended by org.opennms.netmgt.snmp.AggregateTracker
          extended by org.opennms.netmgt.capsd.snmp.SnmpTable<IfTableEntry>
              extended by org.opennms.netmgt.capsd.snmp.IfTable
All Implemented Interfaces:
Collectable

public final class IfTable
extends SnmpTable<IfTableEntry>

The IfTable uses a SnmpSession to collect the entries in the remote agent's interface table. It implements the SnmpHandler to receive notifications and handle errors associated with the data collection. Data is collected using a series of GETNEXT PDU request to walk multiple parts of the interface table at once. The number of SNMP packets should not exceed the number of interface + 1, assuming no lost packets or error conditions occur.

Addition by Jon Whetzel

IfTable has an extra class variable for the SNMP version setting. If this is set for SNMPv2, then a GETBULK command will be used for retrieving the necessary data. Otherwise, the method will resort to its previous implementation with GETNEXT commands.

Author:
Sowmya , Weave , OpenNMS
See Also:
RFC1213

Field Summary
 
Fields inherited from class org.opennms.netmgt.snmp.CollectionTracker
GEN_ERR, NO_ERR, NO_SUCH_NAME_ERR, TOO_BIG_ERR
 
Constructor Summary
IfTable(InetAddress address)
           Constructs an IfTable object that is used to collect the interface elements from the remote agent.
 
Method Summary
protected  IfTableEntry createTableEntry(SnmpObjId base, SnmpInstId inst, Object val)
           
 int getAdminStatus(int ifIndex)
           
 IfTableEntry getEntry(int ifIndex)
           
 String getIfDescr(int ifIndex)
           
 Long getIfSpeed(int ifIndex)
           
 int getIfType(int ifIndex)
           
 int getOperStatus(int ifIndex)
           
 String getPhysAddr(int ifIndex)
           
protected  Category log()
           
 
Methods inherited from class org.opennms.netmgt.capsd.snmp.SnmpTable
getEntries, reportGenErr, reportNoSuchNameErr, storeResult
 
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, reportTooBigErr, setParent, timedOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfTable

public IfTable(InetAddress address)

Constructs an IfTable object that is used to collect the interface elements from the remote agent. Once all the interfaces are collected, or there is an error in the collection the signaler object is notified to inform other threads.

Parameters:
address - TODO
See Also:
IfTableEntry
Method Detail

createTableEntry

protected IfTableEntry createTableEntry(SnmpObjId base,
                                        SnmpInstId inst,
                                        Object val)
Specified by:
createTableEntry in class SnmpTable<IfTableEntry>

log

protected final Category log()

getEntry

public IfTableEntry getEntry(int ifIndex)

getOperStatus

public int getOperStatus(int ifIndex)

getAdminStatus

public int getAdminStatus(int ifIndex)

getIfType

public int getIfType(int ifIndex)

getIfDescr

public String getIfDescr(int ifIndex)

getIfSpeed

public Long getIfSpeed(int ifIndex)

getPhysAddr

public String getPhysAddr(int ifIndex)


Copyright © 2009. All Rights Reserved.