|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.capsd.IfSnmpCollector
public final class 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.
| Constructor Summary | |
|---|---|
IfSnmpCollector(InetAddress address)
Constructs a new snmp collector for a node using the passed interface as the collection point. |
|
| Method Summary | |
|---|---|
boolean |
failed()
Returns true if any part of the collection failed. |
int |
getAdminStatus(int ifIndex)
|
InetAddress |
getCollectorTargetAddress()
Returns the target address that the collection occured for. |
InetAddress[] |
getIfAddressAndMask(int ifIndex)
Returns the Internet address at the corresponding index. |
String |
getIfAlias(int ifIndex)
|
String |
getIfDescr(int ifIndex)
|
int |
getIfIndex(InetAddress address)
|
String |
getIfName(int ifIndex)
|
IfTable |
getIfTable()
Returns the collected interface table. |
int |
getIfType(int ifIndex)
|
IfXTable |
getIfXTable()
Returns the collected interface extensions table. |
Long |
getInterfaceSpeed(int ifIndex)
|
IpAddrTable |
getIpAddrTable()
Returns the collected IP Interface Address table. |
int |
getOperStatus(int ifIndex)
|
String |
getPhysAddr(int ifIndex)
|
SystemGroup |
getSystemGroup()
Returns the collected system group. |
boolean |
hasIfTable()
Returns true if the interface table was collected. |
boolean |
hasIfXTable()
Returns true if the interface extensions table was collected. |
boolean |
hasIpAddrTable()
Returns true if the IP Interface Address table was collected. |
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 |
| Constructor Detail |
|---|
public IfSnmpCollector(InetAddress address)
run method is invoked.
| Method Detail |
|---|
public boolean failed()
public boolean hasSystemGroup()
public SystemGroup getSystemGroup()
public boolean hasIfTable()
public IfTable getIfTable()
public boolean hasIpAddrTable()
public IpAddrTable getIpAddrTable()
public boolean hasIfXTable()
public IfXTable getIfXTable()
public InetAddress getCollectorTargetAddress()
public InetAddress[] getIfAddressAndMask(int ifIndex)
ifIndex - The index to search for.
IndexOutOfBoundsException - Thrown if the index cannot be resolved due to an incomplete
table.public int getAdminStatus(int ifIndex)
public int getOperStatus(int ifIndex)
public int getIfType(int ifIndex)
public int getIfIndex(InetAddress address)
public String getIfName(int ifIndex)
public String getIfDescr(int ifIndex)
public Long getInterfaceSpeed(int ifIndex)
public String getPhysAddr(int ifIndex)
public String 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 Runnable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||