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.

Version:
$Id: $
Author:
Matt Brozowski, James Zuo , Sowmya , Weave , OpenNMS , Matt Brozowski, James Zuo , Sowmya , Weave , OpenNMS , Matt Brozowski, James Zuo , Sowmya , Weave , OpenNMS , Matt Brozowski, James Zuo , Sowmya , Weave , OpenNMS , 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)
          createTableEntry
 InetAddress[] getIfAddressAndMask(int ifIndex)
          getIfAddressAndMask
 int getIfIndex(InetAddress address)
          getIfIndex
 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  ThreadCategory log()
          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, setMaxRepetitions, setTimedOut
 
Methods inherited from class org.opennms.netmgt.snmp.CollectionTracker
failed, getCollectionTracker, getParent, reportTooBigErr, setFinished, 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)

createTableEntry

Specified by:
createTableEntry in class SnmpTable<IpAddrTableEntry>
Parameters:
base - a SnmpObjId object.
inst - a SnmpInstId object.
val - a Object object.
Returns:
a T object.

getIfAddressAndMask

public InetAddress[] getIfAddressAndMask(int ifIndex)

getIfAddressAndMask

Parameters:
ifIndex - a int.
Returns:
an array of InetAddress objects.

getIfIndex

public int getIfIndex(InetAddress address)

getIfIndex

Parameters:
address - a InetAddress object.
Returns:
a int.

log

protected final ThreadCategory log()

log

Returns:
a ThreadCategory object.

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:
index - a int.
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.

Returns:
list of InetAddress objects representing each of the interfaces IP addresses.


Copyright © 2011. All Rights Reserved.