|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.capsd.IfSnmpCollector
This class is designed to collect the necessary SNMP information from the target address and store the collected information. When the class is initially constructed no information is collected. The SNMP Session creating and colletion occurs in the main run method of the instance. This allows the collection to occur in a thread if necessary.
Field Summary | |
private java.net.InetAddress |
m_address
The IP address to used to collect the SNMP information |
private IfTable |
m_ifTable
The interface table information |
private IfXTable |
m_ifXTable
The interface extensions table information |
private IpAddrTable |
m_ipAddrTable
The IP address table |
private SnmpPeer |
m_peer
The SnmpPeer object used to communicate via SNMP with the remote host. |
private SystemGroup |
m_sysGroup
The system group information |
Constructor Summary | |
private |
IfSnmpCollector()
The default constructor. |
(package private) |
IfSnmpCollector(SnmpPeer peer)
Constructs a new snmp collector for a node using the passed interface as the collection point. |
Method Summary | |
(package private) boolean |
failed()
Returns true if any part of the collection failed. |
(package private) int |
getAdminStatus(int ifIndex)
|
(package private) java.net.InetAddress[] |
getIfAddressAndMask(int ifIndex)
Returns the Internet address at the corresponding index. |
(package private) SnmpOctetString |
getIfAlias(int ifIndex)
|
(package private) int |
getIfIndex(java.net.InetAddress address)
|
(package private) SnmpOctetString |
getIfName(int ifIndex)
|
(package private) IfTable |
getIfTable()
Returns the collected interface table. |
(package private) int |
getIfType(int ifIndex)
|
(package private) IfXTable |
getIfXTable()
Returns the collected interface extensions table. |
(package private) IpAddrTable |
getIpAddrTable()
Returns the collected IP Interface Address table. |
(package private) java.net.InetAddress |
getMask(int ifIndex)
Returns the netmask address at the corresponding index. |
(package private) SystemGroup |
getSystemGroup()
Returns the collected system group. |
(package private) java.net.InetAddress |
getTarget()
Returns the target address that the collection occured for. |
(package private) boolean |
hasIfTable()
Returns true if the interface table was collected. |
(package private) boolean |
hasIfXTable()
Returns true if the interface extensions table was collected. |
(package private) boolean |
hasIpAddrTable()
Returns true if the IP Interface Address table was collected. |
(package private) boolean |
hasSystemGroup()
Returns true if the system group was collected successfully |
void |
run()
Preforms the collection for the targeted internet address. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private SnmpPeer m_peer
private final java.net.InetAddress m_address
private SystemGroup m_sysGroup
private IfTable m_ifTable
private IpAddrTable m_ipAddrTable
private IfXTable m_ifXTable
Constructor Detail |
private IfSnmpCollector()
java.lang.UnsupportedOperationException
- Always thrown.IfSnmpCollector(SnmpPeer peer)
run
method is invoked.
peer
- The SnmpPeer object to collect from.Method Detail |
boolean failed()
boolean hasSystemGroup()
SystemGroup getSystemGroup()
boolean hasIfTable()
IfTable getIfTable()
boolean hasIpAddrTable()
IpAddrTable getIpAddrTable()
boolean hasIfXTable()
IfXTable getIfXTable()
java.net.InetAddress getTarget()
java.net.InetAddress getMask(int ifIndex)
ifIndex
- The index to search for.
java.lang.IndexOutOfBoundsException
- Thrown if the index cannot be resolved due to an incomplete
table.java.net.InetAddress[] getIfAddressAndMask(int ifIndex)
ifIndex
- The index to search for.
java.lang.IndexOutOfBoundsException
- Thrown if the index cannot be resolved due to an incomplete
table.int getAdminStatus(int ifIndex)
int getIfType(int ifIndex)
int getIfIndex(java.net.InetAddress address)
SnmpOctetString getIfName(int ifIndex)
SnmpOctetString getIfAlias(int ifIndex)
public void run()
Preforms the collection for the targeted internet address. The success or
failure of the collection should be tested via the failed
method.
No synchronization is preformed, so if this is used in a separate thread context synchornization must be added.
run
in interface java.lang.Runnable
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |