org.opennms.netmgt.provision.service.snmp
Class IpAddressTable

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<IpAddressTableEntry>
              extended by org.opennms.netmgt.provision.service.snmp.IpAddressTable
All Implemented Interfaces:
Collectable

public class IpAddressTable
extends SnmpTable<IpAddressTableEntry>

IpAddressTable uses a SnmpSession to collect the IpAddressTable 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
See Also:
RFC1213

Field Summary
protected static int INSTANCE_TYPE_IPV4
           
protected static int INSTANCE_TYPE_IPV6
           
 
Fields inherited from class org.opennms.netmgt.snmp.CollectionTracker
GEN_ERR, NO_ERR, NO_SUCH_NAME_ERR, TOO_BIG_ERR
 
Constructor Summary
IpAddressTable(InetAddress address)
           Constructs an IpAddressTable object that is used to collect the address elements from the remote agent.
IpAddressTable(InetAddress address, Set<InetAddress> inetAddresses, Set<SnmpInstId> ipAddresses)
          Constructor for IpAddressTable.
 
Method Summary
static IpAddressTable createTable(InetAddress address, Set<InetAddress> ipAddresses)
           
protected  IpAddressTableEntry createTableEntry(SnmpObjId base, SnmpInstId inst, Object val)
          createTableEntry
 IpAddressTableEntry getEntry(InetAddress address)
          getEntry
 IpAddressTableEntry getEntryByIfIndex(int ifIndex)
          getEntryByIfIndex
 InetAddress getIfAddress(int ifIndex)
          getIfAddress
 Integer getIfIndex(InetAddress address)
          getIfIndex
 Set<Integer> getIfIndices()
          getIfIndices
static SnmpInstId getInstanceForAddress(InetAddress address)
           
static Set<SnmpInstId> getInstanceIds(Set<InetAddress> ipAddresses)
           
 Set<String> getIpAddresses()
          getIpAddresses
 InetAddress getNetMask(InetAddress address)
          getNetMask
 InetAddress getNetMask(int ifIndex)
          getNetMask
 void updateIpInterfaceData(OnmsNode node)
          updateIpInterfaceData
 void updateIpInterfaceData(OnmsNode node, String ipAddr)
          updateIpInterfaceData
 
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
 

Field Detail

INSTANCE_TYPE_IPV4

protected static final int INSTANCE_TYPE_IPV4
See Also:
Constant Field Values

INSTANCE_TYPE_IPV6

protected static final int INSTANCE_TYPE_IPV6
See Also:
Constant Field Values
Constructor Detail

IpAddressTable

public IpAddressTable(InetAddress address)

Constructs an IpAddressTable 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:
IpAddressTableEntry

IpAddressTable

public IpAddressTable(InetAddress address,
                      Set<InetAddress> inetAddresses,
                      Set<SnmpInstId> ipAddresses)

Constructor for IpAddressTable.

Parameters:
address - a InetAddress object.
ipAddresses - a Set object.
Method Detail

createTableEntry

protected IpAddressTableEntry createTableEntry(SnmpObjId base,
                                               SnmpInstId inst,
                                               Object val)

createTableEntry

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

getIfIndices

public Set<Integer> getIfIndices()

getIfIndices

Returns:
a Set object.

getIfAddress

public InetAddress getIfAddress(int ifIndex)

getIfAddress

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

getNetMask

public InetAddress getNetMask(int ifIndex)

getNetMask

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

getNetMask

public InetAddress getNetMask(InetAddress address)

getNetMask

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

getIfIndex

public Integer getIfIndex(InetAddress address)

getIfIndex

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

getEntryByIfIndex

public IpAddressTableEntry getEntryByIfIndex(int ifIndex)

getEntryByIfIndex

Parameters:
ifIndex - a int.
Returns:
a IpAddressTableEntry object.

getEntry

public IpAddressTableEntry getEntry(InetAddress address)

getEntry

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

updateIpInterfaceData

public void updateIpInterfaceData(OnmsNode node)

updateIpInterfaceData

Parameters:
node - a OnmsNode object.

updateIpInterfaceData

public void updateIpInterfaceData(OnmsNode node,
                                  String ipAddr)

updateIpInterfaceData

Parameters:
node - a OnmsNode object.
ipAddr - a String object.

getIpAddresses

public Set<String> getIpAddresses()

getIpAddresses

Returns:
a Set object.

createTable

public static IpAddressTable createTable(InetAddress address,
                                         Set<InetAddress> ipAddresses)

getInstanceIds

public static Set<SnmpInstId> getInstanceIds(Set<InetAddress> ipAddresses)

getInstanceForAddress

public static SnmpInstId getInstanceForAddress(InetAddress address)


Copyright © 2011. All Rights Reserved.