|
|||||||||
| 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 |
IpRouteTable |
m_ipRoute
The ipRoute table information |
Map<Vlan,org.opennms.netmgt.linkd.SnmpVlanCollection> |
m_snmpVlanCollection
The list of vlan snmp collection object |
SnmpTable |
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(SnmpAgentConfig config)
Constructs a new snmp collector for a node using the passed interface as the collection point. |
|
| Method Summary | |
|---|---|
void |
collectBridgeForwardingTable(boolean bridgeForwardingTable)
|
void |
collectCdpTable(boolean cdpTable)
|
void |
collectIpRouteTable(boolean ipRouteTable)
|
void |
collectStpNode(boolean stpNode)
|
void |
collectStpTable(boolean stpTable)
|
boolean |
collectVlanTable()
|
boolean |
equals(ReadyRunnable run)
|
boolean |
getCollectBridgeForwardingTable()
|
boolean |
getCollectCdpTable()
|
boolean |
getCollectIpRouteTable()
|
boolean |
getCollectStpNode()
|
boolean |
getCollectStpTable()
|
String |
getInfo()
|
long |
getInitialSleepTime()
|
String |
getPackageName()
|
SnmpAgentConfig |
getPeer()
|
long |
getPollInterval()
|
int |
getPort()
|
String |
getReadCommunity()
|
boolean |
getSaveIpRouteTable()
|
boolean |
getSaveStpInterfaceTable()
|
boolean |
getSaveStpNodeTable()
|
Scheduler |
getScheduler()
|
InetAddress |
getTarget()
Returns the target address that the collection occured for. |
String |
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()
Returns true if the runnable is ready to start. |
boolean |
isSuspended()
|
void |
run()
Performs the collection for the targeted internet address. |
void |
SaveIpRouteTable(boolean ipRouteTable)
|
void |
saveStpInterfaceTable(boolean stpInterfaceTable)
|
void |
saveStpNodeTable(boolean stpNodeTable)
|
void |
schedule()
|
void |
setInitialSleepTime(long initial_sleep_time)
|
void |
setPackageName(String packageName)
|
void |
setPollInterval(long interval)
|
void |
setScheduler(Scheduler scheduler)
|
void |
setVlanClass(String className)
|
void |
suspend()
|
void |
unschedule()
|
void |
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 IpRouteTable m_ipRoute
public CdpCacheTable m_CdpCache
public SnmpTable m_vlanTable
public Map<Vlan,org.opennms.netmgt.linkd.SnmpVlanCollection> m_snmpVlanCollection
| Constructor Detail |
|---|
public SnmpCollection(SnmpAgentConfig config)
run method is invoked.
config - The SnmpPeer object to collect from.| Method Detail |
|---|
public String getVlanName(int m_vlan)
public int getVlanIndex(String m_vlanname)
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 synchornization must be added.
run in interface Runnablepublic Scheduler getScheduler()
public void setScheduler(Scheduler scheduler)
public long getInitialSleepTime()
public void setInitialSleepTime(long initial_sleep_time)
initial_sleep_time - The initial_sleep_timeto set.public long getPollInterval()
public void setPollInterval(long interval)
initial_sleep_time - The initial_sleep_timeto set.public void schedule()
schedule in interface ReadyRunnablepublic boolean isReady()
ReadyRunnable
isReady in interface ReadyRunnablepublic boolean isSuspended()
isSuspended in interface ReadyRunnablepublic void suspend()
suspend in interface ReadyRunnablesuspendCollection - The suspendCollection to set.public void wakeUp()
wakeUp in interface ReadyRunnablesuspendCollection - The suspendCollection to set.public void unschedule()
unschedule in interface ReadyRunnablepublic String getVlanClass()
public void setVlanClass(String className)
public InetAddress getTarget()
public boolean collectVlanTable()
public String getReadCommunity()
public SnmpAgentConfig getPeer()
public int getPort()
public boolean equals(ReadyRunnable run)
equals in interface ReadyRunnablepublic String getInfo()
getInfo in interface ReadyRunnablepublic boolean getCollectBridgeForwardingTable()
public void collectBridgeForwardingTable(boolean bridgeForwardingTable)
public boolean getCollectCdpTable()
public void collectCdpTable(boolean cdpTable)
public boolean getCollectIpRouteTable()
public void collectIpRouteTable(boolean ipRouteTable)
public boolean getCollectStpNode()
public void collectStpNode(boolean stpNode)
public boolean getCollectStpTable()
public void collectStpTable(boolean stpTable)
public String getPackageName()
getPackageName in interface ReadyRunnablepublic void setPackageName(String packageName)
setPackageName in interface ReadyRunnablepublic boolean getSaveStpNodeTable()
public void saveStpNodeTable(boolean stpNodeTable)
public boolean getSaveIpRouteTable()
public void SaveIpRouteTable(boolean ipRouteTable)
public boolean getSaveStpInterfaceTable()
public void saveStpInterfaceTable(boolean stpInterfaceTable)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||