public final class IfSnmpCollector extends Object implements Runnable
Constructor and Description |
---|
IfSnmpCollector(InetAddress address)
Constructs a new snmp collector for a node using the passed interface as
the collection point.
|
Modifier and Type | Method and Description |
---|---|
boolean |
failed()
Returns true if any part of the collection failed.
|
int |
getAdminStatus(int ifIndex)
getAdminStatus
|
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)
getIfAlias
|
String |
getIfDescr(int ifIndex)
getIfDescr
|
int |
getIfIndex(InetAddress address)
getIfIndex
|
String |
getIfName(int ifIndex)
getIfName
|
IfTable |
getIfTable()
Returns the collected interface table.
|
int |
getIfType(int ifIndex)
getIfType
|
IfXTable |
getIfXTable()
Returns the collected interface extensions table.
|
Long |
getInterfaceSpeed(int ifIndex)
getInterfaceSpeed
|
IpAddrTable |
getIpAddrTable()
Returns the collected IP Interface Address table.
|
int |
getOperStatus(int ifIndex)
getOperStatus
|
String |
getPhysAddr(int ifIndex)
getPhysAddr
|
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.
|
public IfSnmpCollector(InetAddress address)
run
method is invoked.address
- a InetAddress
object.public boolean failed()
public boolean hasSystemGroup()
public SystemGroup getSystemGroup()
SystemGroup
object.public boolean hasIfTable()
public IfTable getIfTable()
IfTable
object.public boolean hasIpAddrTable()
public IpAddrTable getIpAddrTable()
IpAddrTable
object.public boolean hasIfXTable()
public IfXTable getIfXTable()
IfXTable
object.public InetAddress getCollectorTargetAddress()
InetAddress
object.public InetAddress[] getIfAddressAndMask(int ifIndex)
ifIndex
- The index to search for.InetAddress
objects.IndexOutOfBoundsException
- Thrown if the index cannot be resolved due to an incomplete
table.public int getAdminStatus(int ifIndex)
getAdminStatus
ifIndex
- a int.public int getOperStatus(int ifIndex)
getOperStatus
ifIndex
- a int.public int getIfType(int ifIndex)
getIfType
ifIndex
- a int.public int getIfIndex(InetAddress address)
getIfIndex
address
- a InetAddress
object.public String getIfName(int ifIndex)
getIfName
ifIndex
- a int.String
object.public String getIfDescr(int ifIndex)
getIfDescr
ifIndex
- a int.String
object.public Long getInterfaceSpeed(int ifIndex)
getInterfaceSpeed
ifIndex
- a int.Long
object.public String getPhysAddr(int ifIndex)
getPhysAddr
ifIndex
- a int.String
object.public String getIfAlias(int ifIndex)
getIfAlias
ifIndex
- a int.String
object.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.
Copyright © 2015. All Rights Reserved.