org.opennms.netmgt.capsd.snmp
Class IpAddrTable

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<IpAddrTableEntry>
              extended by org.opennms.netmgt.capsd.snmp.IpAddrTable
All Implemented Interfaces:
Collectable

public class IpAddrTable
extends SnmpTable<IpAddrTableEntry>

IpAddrTable uses a SnmpSession to collect the ipAddrTable entries It implements the SnmpHandler to receive notifications when a reply is received/error occurs in the SnmpSession used to send requests /recieve replies.

Author:
Matt Brozowski, James Zuo , 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
IpAddrTable(InetAddress address)
           Constructs an IpAddrTable object that is used to collect the address elements from the remote agent.
 
Method Summary
protected  IpAddrTableEntry createTableEntry(SnmpObjId base, SnmpInstId inst, Object val)
           
 InetAddress[] getIfAddressAndMask(int ifIndex)
           
 int getIfIndex(InetAddress address)
           
 List<InetAddress> getIpAddresses()
          Returns all Internet addresses in the ipAddrEntry list.
 List<InetAddress> getIpAddresses(int index)
          Returns all Internet addresses at the corresponding index.
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

IpAddrTable

public IpAddrTable(InetAddress address)

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

Parameters:
address - TODO
See Also:
IpAddrTableEntry
Method Detail

createTableEntry

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

getIfAddressAndMask

public InetAddress[] getIfAddressAndMask(int ifIndex)

getIfIndex

public int getIfIndex(InetAddress address)

log

protected final Category log()

getIpAddresses

public List<InetAddress> getIpAddresses(int index)
Returns all Internet addresses at the corresponding index. If the address cannot be resolved then a null reference is returned.

Parameters:
ifIndex - The index to search for.
Returns:
list of InetAddress objects representing each of the interfaces IP addresses.

getIpAddresses

public List<InetAddress> getIpAddresses()
Returns all Internet addresses in the ipAddrEntry list. If the address cannot be resolved then a null reference is returned.

Parameters:
ipAddrEntries - List of IpAddrTableEntry objects to search
Returns:
list of InetAddress objects representing each of the interfaces IP addresses.


Copyright © 2009. All Rights Reserved.