org.opennms.netmgt.provision.service.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.provision.service.snmp.SnmpTable<IpAddrTableEntry>
              extended by org.opennms.netmgt.provision.service.snmp.IpAddrTable
All Implemented Interfaces:
org.opennms.netmgt.snmp.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.
IpAddrTable(InetAddress address, Set<org.opennms.netmgt.snmp.SnmpInstId> ipAddrs)
           
 
Method Summary
protected  IpAddrTableEntry createTableEntry(org.opennms.netmgt.snmp.SnmpObjId base, org.opennms.netmgt.snmp.SnmpInstId inst, Object val)
           
 IpAddrTableEntry getEntry(InetAddress address)
           
 IpAddrTableEntry getEntryByIfIndex(int ifIndex)
           
 InetAddress getIfAddress(int ifIndex)
           
 InetAddress[] getIfAddressAndMask(int ifIndex)
           
 Integer getIfIndex(InetAddress address)
           
 Set<Integer> getIfIndices()
           
 Set<String> getIpAddresses()
           
 InetAddress getNetMask(InetAddress address)
           
 InetAddress getNetMask(int ifIndex)
           
protected  Category log()
           
 void updateIpInterfaceData(OnmsNode node)
           
 void updateIpInterfaceData(OnmsNode node, String ipAddr)
           
 
Methods inherited from class org.opennms.netmgt.provision.service.snmp.SnmpTable
getEntries, getEntry, getEntry, getInstances, 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

IpAddrTable

public IpAddrTable(InetAddress address,
                   Set<org.opennms.netmgt.snmp.SnmpInstId> ipAddrs)
Method Detail

createTableEntry

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

getIfIndices

public Set<Integer> getIfIndices()

getIfAddressAndMask

public InetAddress[] getIfAddressAndMask(int ifIndex)

getIfAddress

public InetAddress getIfAddress(int ifIndex)

getNetMask

public InetAddress getNetMask(int ifIndex)

getNetMask

public InetAddress getNetMask(InetAddress address)

getIfIndex

public Integer getIfIndex(InetAddress address)

getEntryByIfIndex

public IpAddrTableEntry getEntryByIfIndex(int ifIndex)

getEntry

public IpAddrTableEntry getEntry(InetAddress address)

log

protected final Category log()

updateIpInterfaceData

public void updateIpInterfaceData(OnmsNode node)

updateIpInterfaceData

public void updateIpInterfaceData(OnmsNode node,
                                  String ipAddr)
Parameters:
node -
ipAddr -

getIpAddresses

public Set<String> getIpAddresses()


Copyright © 2009. All Rights Reserved.