Class IpAddressTable
- java.lang.Object
-
- org.opennms.netmgt.snmp.CollectionTracker
-
- org.opennms.netmgt.snmp.AggregateTracker
-
- org.opennms.netmgt.provision.service.snmp.SnmpTable<IpAddressTableEntry>
-
- org.opennms.netmgt.provision.service.snmp.IpAddressTable
-
- All Implemented Interfaces:
Collectable
,ProxiableTracker
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
Fields Modifier and Type Field Description protected static int
INSTANCE_TYPE_IPV4
protected static int
INSTANCE_TYPE_IPV6
-
Constructor Summary
Constructors Constructor Description IpAddressTable(java.net.InetAddress address)
Constructs an IpAddressTable object that is used to collect the address elements from the remote agent.IpAddressTable(java.net.InetAddress address, java.util.Set<java.net.InetAddress> inetAddresses, java.util.Set<SnmpInstId> ipAddresses)
Constructor for IpAddressTable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IpAddressTable
createTable(java.net.InetAddress address, java.util.Set<java.net.InetAddress> ipAddresses)
protected IpAddressTableEntry
createTableEntry(SnmpObjId base, SnmpInstId inst, java.lang.Object val)
createTableEntryIpAddressTableEntry
getEntry(java.net.InetAddress address)
getEntryIpAddressTableEntry
getEntryByIfIndex(int ifIndex)
getEntryByIfIndexjava.net.InetAddress
getIfAddress(int ifIndex)
getIfAddressjava.lang.Integer
getIfIndex(java.net.InetAddress address)
getIfIndexjava.util.Set<java.lang.Integer>
getIfIndices()
getIfIndicesstatic SnmpInstId
getInstanceForAddress(java.net.InetAddress address)
static java.util.Set<SnmpInstId>
getInstanceIds(java.util.Set<java.net.InetAddress> ipAddresses)
java.util.Set<java.lang.String>
getIpAddresses()
getIpAddressesjava.net.InetAddress
getNetMask(int ifIndex)
getNetMaskjava.net.InetAddress
getNetMask(java.net.InetAddress address)
getNetMaskvoid
updateIpInterfaceData(OnmsNode node)
updateIpInterfaceDataboolean
updateIpInterfaceData(OnmsNode node, java.net.InetAddress ipAddr)
updateIpInterfaceData-
Methods inherited from class org.opennms.netmgt.provision.service.snmp.SnmpTable
getEntries, getEntry, getEntry, getInstances, reportFatalErr, reportGenErr, reportNonFatalErr, reportNoSuchNameErr, storeResult
-
Methods inherited from class org.opennms.netmgt.snmp.AggregateTracker
buildNextPdu, getWalkRequests, handleWalkResponses, isFinished, setFailed, setMaxRepetitions, setMaxRetries, setTimedOut
-
Methods inherited from class org.opennms.netmgt.snmp.CollectionTracker
failed, getCollectionTracker, getParent, reportTooBigErr, setFinished, setParent, timedOut
-
-
-
-
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(java.net.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(java.net.InetAddress address, java.util.Set<java.net.InetAddress> inetAddresses, java.util.Set<SnmpInstId> ipAddresses)
Constructor for IpAddressTable.
- Parameters:
address
- aInetAddress
object.ipAddresses
- aSet
object.
-
-
Method Detail
-
createTableEntry
protected IpAddressTableEntry createTableEntry(SnmpObjId base, SnmpInstId inst, java.lang.Object val)
createTableEntry
- Specified by:
createTableEntry
in classSnmpTable<IpAddressTableEntry>
- Parameters:
base
- aSnmpObjId
object.inst
- aSnmpInstId
object.val
- aObject
object.- Returns:
- a T object.
-
getIfIndices
public java.util.Set<java.lang.Integer> getIfIndices()
getIfIndices
- Returns:
- a
Set
object.
-
getIfAddress
public java.net.InetAddress getIfAddress(int ifIndex)
getIfAddress
- Parameters:
ifIndex
- a int.- Returns:
- a
InetAddress
object.
-
getNetMask
public java.net.InetAddress getNetMask(int ifIndex)
getNetMask
- Parameters:
ifIndex
- a int.- Returns:
- a
InetAddress
object.
-
getNetMask
public java.net.InetAddress getNetMask(java.net.InetAddress address)
getNetMask
- Parameters:
address
- aInetAddress
object.- Returns:
- a
InetAddress
object.
-
getIfIndex
public java.lang.Integer getIfIndex(java.net.InetAddress address)
getIfIndex
- Parameters:
address
- aInetAddress
object.- Returns:
- a
Integer
object.
-
getEntryByIfIndex
public IpAddressTableEntry getEntryByIfIndex(int ifIndex)
getEntryByIfIndex
- Parameters:
ifIndex
- a int.- Returns:
- a
IpAddressTableEntry
object.
-
getEntry
public IpAddressTableEntry getEntry(java.net.InetAddress address)
getEntry
- Parameters:
address
- aInetAddress
object.- Returns:
- a
IpAddressTableEntry
object.
-
updateIpInterfaceData
public void updateIpInterfaceData(OnmsNode node)
updateIpInterfaceData
- Parameters:
node
- aOnmsNode
object.
-
updateIpInterfaceData
public boolean updateIpInterfaceData(OnmsNode node, java.net.InetAddress ipAddr)
updateIpInterfaceData
- Parameters:
node
- aOnmsNode
object.ipAddr
- aString
object.
-
getIpAddresses
public java.util.Set<java.lang.String> getIpAddresses()
getIpAddresses
- Returns:
- a
Set
object.
-
createTable
public static IpAddressTable createTable(java.net.InetAddress address, java.util.Set<java.net.InetAddress> ipAddresses)
-
getInstanceIds
public static java.util.Set<SnmpInstId> getInstanceIds(java.util.Set<java.net.InetAddress> ipAddresses)
-
getInstanceForAddress
public static SnmpInstId getInstanceForAddress(java.net.InetAddress address)
-
-