|
|||||||||
| 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 | |
|---|---|
CdpCacheTable |
m_CdpCache
The CdpCache table information |
IpNetToMediaTable |
m_ipNetToMedia
The ipnettomedia table information |
IpRouteTable |
m_ipRoute
The ipRoute table information |
java.util.Map<org.opennms.netmgt.linkd.SnmpCollection.Vlan,org.opennms.netmgt.linkd.SnmpVlanCollection> |
m_snmpVlanCollection
The list of vlan snmp collection object |
SnmpTable |
m_vlanTable
The Vlan Table information |
| Constructor Summary | |
|---|---|
SnmpCollection(org.opennms.netmgt.snmp.SnmpAgentConfig config)
Constructs a new snmp collector for a node using the passed interface as the collection point. |
|
| Method Summary | |
|---|---|
boolean |
collectVlanTable()
|
boolean |
equals(ReadyRunnable run)
|
java.lang.String |
getInfo()
|
long |
getInitialSleepTime()
|
org.opennms.netmgt.snmp.SnmpAgentConfig |
getPeer()
|
long |
getPollInterval()
|
int |
getPort()
|
java.lang.String |
getReadCommunity()
|
Scheduler |
getScheduler()
|
java.net.InetAddress |
getTarget()
Returns the target address that the collection occured for. |
java.lang.String |
getVlanClass()
|
int |
getVlanIndex(java.lang.String m_vlanname)
Returns the VLAN vlanindex from name. |
java.lang.String |
getVlanName(int m_vlan)
Returns the VLAN name from vlanindex. |
boolean |
isDiscoveryLink()
|
boolean |
isReady()
Returns true if the runnable is ready to start. |
boolean |
isSnmpCollection()
|
boolean |
isSuspended()
|
void |
run()
Performs the collection for the targeted internet address. |
void |
schedule()
|
void |
setInitialSleepTime(long initial_sleep_time)
|
void |
setPollInterval(long interval)
|
void |
setScheduler(Scheduler scheduler)
|
void |
setVlanClass(java.lang.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 IpNetToMediaTable m_ipNetToMedia
public IpRouteTable m_ipRoute
public CdpCacheTable m_CdpCache
public SnmpTable m_vlanTable
public java.util.Map<org.opennms.netmgt.linkd.SnmpCollection.Vlan,org.opennms.netmgt.linkd.SnmpVlanCollection> m_snmpVlanCollection
| Constructor Detail |
|---|
public SnmpCollection(org.opennms.netmgt.snmp.SnmpAgentConfig config)
run method is invoked.
config - The SnmpPeer object to collect from.| Method Detail |
|---|
public java.lang.String getVlanName(int m_vlan)
public int getVlanIndex(java.lang.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 java.lang.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 java.lang.String getVlanClass()
public void setVlanClass(java.lang.String className)
public java.net.InetAddress getTarget()
public boolean isSnmpCollection()
public boolean isDiscoveryLink()
public boolean collectVlanTable()
public java.lang.String getReadCommunity()
public org.opennms.netmgt.snmp.SnmpAgentConfig getPeer()
public int getPort()
public boolean equals(ReadyRunnable run)
equals in interface ReadyRunnablepublic java.lang.String getInfo()
getInfo in interface ReadyRunnable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||