public final class SnmpCollection extends Object implements ReadyRunnable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_VLAN_INDEX
The VLAN string to define default VLAN index
|
static String |
DEFAULT_VLAN_NAME
The VLAN string to define default VLAN name
|
CdpCacheTable |
m_CdpCache
The CdpCache table information
|
IpNetToMediaTable |
m_ipNetToMedia
The ipnettomedia table information
|
SnmpTable<SnmpStore> |
m_ipRoute
The ipRoute table information
|
Map<OnmsVlan,org.opennms.netmgt.linkd.SnmpVlanCollection> |
m_snmpVlanCollection
The list of VLAN SNMP collection object
|
SnmpTable<SnmpStore> |
m_vlanTable
The VLAN Table information
|
static int |
TRUNK_VLAN_INDEX
The VLAN string to define VLAN index when collection is made for all VLAN
|
static String |
TRUNK_VLAN_NAME
The VLAN string to define VLAN name when collection is made for all VLAN
|
Constructor and Description |
---|
SnmpCollection(Linkd linkd,
int nodeid,
SnmpAgentConfig config)
Constructs a new SNMP collector for a node using the passed interface as
the collection point.
|
Modifier and Type | Method and Description |
---|---|
void |
collectBridgeForwardingTable(boolean bridgeForwardingTable)
collectBridgeForwardingTable
|
void |
collectCdpTable(boolean cdpTable)
collectCdpTable
|
void |
collectIpRouteTable(boolean ipRouteTable)
collectIpRouteTable
|
void |
collectStpNode(boolean stpNode)
collectStpNode
|
void |
collectStpTable(boolean stpTable)
collectStpTable
|
boolean |
collectVlanTable()
collectVlanTable
|
boolean |
equals(ReadyRunnable run)
equals
|
boolean |
getCollectBridgeForwardingTable()
getCollectBridgeForwardingTable
|
boolean |
getCollectCdpTable()
getCollectCdpTable
|
boolean |
getCollectIpRouteTable()
getCollectIpRouteTable
|
boolean |
getCollectStpNode()
getCollectStpNode
|
boolean |
getCollectStpTable()
getCollectStpTable
|
String |
getInfo()
getInfo
|
long |
getInitialSleepTime()
getInitialSleepTime
|
String |
getIpRouteClass() |
String |
getPackageName()
Getter for the field
packageName . |
SnmpAgentConfig |
getPeer()
getPeer
|
long |
getPollInterval()
getPollInterval
|
int |
getPort()
getPort
|
String |
getReadCommunity()
getReadCommunity
|
boolean |
getSaveIpRouteTable()
getSaveIpRouteTable
|
boolean |
getSaveStpInterfaceTable()
getSaveStpInterfaceTable
|
boolean |
getSaveStpNodeTable()
getSaveStpNodeTable
|
Scheduler |
getScheduler()
getScheduler
|
InetAddress |
getTarget()
Returns the target address that the collection occurred for.
|
String |
getVlanClass()
getVlanClass
|
int |
getVlanIndex(String m_vlanname)
Returns the VLAN vlanindex from name.
|
String |
getVlanName(int m_vlan)
Returns the VLAN name from vlanindex.
|
boolean |
isReady()
isReady
|
boolean |
isSuspended()
isSuspended
|
void |
run()
Performs the collection for the targeted IP address.
|
void |
SaveIpRouteTable(boolean ipRouteTable)
SaveIpRouteTable
|
void |
saveStpInterfaceTable(boolean stpInterfaceTable)
saveStpInterfaceTable
|
void |
saveStpNodeTable(boolean stpNodeTable)
saveStpNodeTable
|
void |
schedule()
schedule
|
void |
setInitialSleepTime(long initial_sleep_time)
setInitialSleepTime
|
void |
setIpRouteClass(String className) |
void |
setPackageName(String packageName)
setPackageName
|
void |
setPollInterval(long interval)
setPollInterval
|
void |
setScheduler(Scheduler scheduler)
setScheduler
|
void |
setVlanClass(String className)
setVlanClass
|
void |
suspend()
suspend
|
void |
unschedule()
unschedule
|
void |
wakeUp()
wakeUp
|
public static final String TRUNK_VLAN_NAME
public static final int TRUNK_VLAN_INDEX
public static final String DEFAULT_VLAN_NAME
public static final int DEFAULT_VLAN_INDEX
public IpNetToMediaTable m_ipNetToMedia
public CdpCacheTable m_CdpCache
public SnmpCollection(Linkd linkd, int nodeid, SnmpAgentConfig config)
run
method is invoked.nodeid
- config
- The SnmpPeer object to collect from.public String getVlanName(int m_vlan)
m_vlan
- a int.String
object.public int getVlanIndex(String m_vlanname)
m_vlanname
- a String
object.public void run()
Performs the collection for the targeted IP address. The success or
failure of the collection should be tested via the failed
method.
No synchronization is performed, so if this is used in a separate thread context synchronization must be added.
public void setScheduler(Scheduler scheduler)
setScheduler
scheduler
- a Scheduler
object.public long getInitialSleepTime()
getInitialSleepTime
public void setInitialSleepTime(long initial_sleep_time)
setInitialSleepTime
initial_sleep_time
- The initial_sleep_timeto set.public long getPollInterval()
getPollInterval
public void setPollInterval(long interval)
setPollInterval
interval
- a long.public void schedule()
schedule
schedule
in interface ReadyRunnable
public boolean isReady()
isReady
isReady
in interface ReadyRunnable
public boolean isSuspended()
isSuspended
isSuspended
in interface ReadyRunnable
public void suspend()
suspend
suspend
in interface ReadyRunnable
public void wakeUp()
wakeUp
wakeUp
in interface ReadyRunnable
public void unschedule()
unschedule
unschedule
in interface ReadyRunnable
public String getIpRouteClass()
public void setIpRouteClass(String className)
public String getVlanClass()
getVlanClass
public void setVlanClass(String className)
setVlanClass
className
- a String
object.public InetAddress getTarget()
InetAddress
object.public boolean collectVlanTable()
collectVlanTable
public SnmpAgentConfig getPeer()
getPeer
SnmpAgentConfig
object.public int getPort()
getPort
public boolean equals(ReadyRunnable run)
equals
equals
in interface ReadyRunnable
run
- a ReadyRunnable
object.public String getInfo()
getInfo
getInfo
in interface ReadyRunnable
String
object.public boolean getCollectBridgeForwardingTable()
getCollectBridgeForwardingTable
public void collectBridgeForwardingTable(boolean bridgeForwardingTable)
collectBridgeForwardingTable
bridgeForwardingTable
- a boolean.public boolean getCollectCdpTable()
getCollectCdpTable
public void collectCdpTable(boolean cdpTable)
collectCdpTable
cdpTable
- a boolean.public boolean getCollectIpRouteTable()
getCollectIpRouteTable
public void collectIpRouteTable(boolean ipRouteTable)
collectIpRouteTable
ipRouteTable
- a boolean.public boolean getCollectStpNode()
getCollectStpNode
public void collectStpNode(boolean stpNode)
collectStpNode
stpNode
- a boolean.public boolean getCollectStpTable()
getCollectStpTable
public void collectStpTable(boolean stpTable)
collectStpTable
stpTable
- a boolean.public String getPackageName()
Getter for the field packageName
.
getPackageName
in interface ReadyRunnable
String
object.public void setPackageName(String packageName)
setPackageName
setPackageName
in interface ReadyRunnable
packageName
- a String
object.public boolean getSaveStpNodeTable()
getSaveStpNodeTable
public void saveStpNodeTable(boolean stpNodeTable)
saveStpNodeTable
stpNodeTable
- a boolean.public boolean getSaveIpRouteTable()
getSaveIpRouteTable
public void SaveIpRouteTable(boolean ipRouteTable)
SaveIpRouteTable
ipRouteTable
- a boolean.public boolean getSaveStpInterfaceTable()
getSaveStpInterfaceTable
public void saveStpInterfaceTable(boolean stpInterfaceTable)
saveStpInterfaceTable
stpInterfaceTable
- a boolean.Copyright © 2015. All Rights Reserved.