|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.linkd.SnmpCollection
public final class SnmpCollection
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 | |
|---|---|
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<SnmpTableEntry> |
m_ipRoute
The ipRoute table information |
Map<Vlan,org.opennms.netmgt.linkd.SnmpVlanCollection> |
m_snmpVlanCollection
The list of vlan snmp collection object |
SnmpTable<SnmpTableEntry> |
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 Summary | |
|---|---|
SnmpCollection(Linkd linkd,
SnmpAgentConfig config)
Constructs a new snmp collector for a node using the passed interface as the collection point. |
|
| Method Summary | |
|---|---|
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 occured 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 internet 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 SnmpTable<SnmpTableEntry> m_ipRoute
public CdpCacheTable m_CdpCache
public SnmpTable<SnmpTableEntry> m_vlanTable
public Map<Vlan,org.opennms.netmgt.linkd.SnmpVlanCollection> m_snmpVlanCollection
| Constructor Detail |
|---|
public SnmpCollection(Linkd linkd,
SnmpAgentConfig config)
run method is invoked.
config - The SnmpPeer object to collect from.| Method Detail |
|---|
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 internet 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.
run in interface Runnablepublic Scheduler getScheduler()
getScheduler
Scheduler object.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 ReadyRunnablepublic boolean isReady()
isReady
isReady in interface ReadyRunnablepublic boolean isSuspended()
isSuspended
isSuspended in interface ReadyRunnablepublic void suspend()
suspend
suspend in interface ReadyRunnablepublic void wakeUp()
wakeUp
wakeUp in interface ReadyRunnablepublic void unschedule()
unschedule
unschedule in interface ReadyRunnablepublic 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 String getReadCommunity()
getReadCommunity
String object.public SnmpAgentConfig getPeer()
getPeer
SnmpAgentConfig object.public int getPort()
getPort
public boolean equals(ReadyRunnable run)
equals
equals in interface ReadyRunnablerun - a ReadyRunnable object.
public String getInfo()
getInfo
getInfo in interface ReadyRunnableString 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 ReadyRunnableString object.public void setPackageName(String packageName)
setPackageName
setPackageName in interface ReadyRunnablepackageName - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||