Class Discovery
- java.lang.Object
-
- org.opennms.netmgt.enlinkd.common.Discovery
-
- All Implemented Interfaces:
Runnable,ReadyRunnable
- Direct Known Subclasses:
DiscoveryBridgeDomains,NodeCollector,TopologyUpdater
public abstract class Discovery extends Object implements ReadyRunnable
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 collection occurs in the main run method of the instance. This allows the collection to occur in a thread if necessary.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetInfo()getInfolonggetInitialSleepTime()getInitialSleepTimeabstract StringgetName()longgetPollInterval()getPollIntervalLegacySchedulergetScheduler()getSchedulerinthashCode()booleanisReady()isReadyvoidrun()abstract voidrunDiscovery()voidschedule()schedulevoidsetInitialSleepTime(long initial_sleep_time)setInitialSleepTimevoidsetPollInterval(long interval)setPollIntervalvoidsetScheduler(LegacyScheduler scheduler)setSchedulervoidsuspend()suspendvoidunschedule()voidwakeUp()wakeUp
-
-
-
Constructor Detail
-
Discovery
public Discovery(long interval, long initial)Constructs a new SNMP collector for a node using the passed interface as the collection point. The collection does not occur until therunmethod is invoked.- Parameters:
nodeid-config- The SnmpPeer object to collect from.
-
Discovery
public Discovery()
-
-
Method Detail
-
getName
public abstract String getName()
-
runDiscovery
public abstract void runDiscovery()
-
getScheduler
public LegacyScheduler getScheduler()
getScheduler
- Returns:
- a
org.opennms.netmgt.enlinkd.scheduler.Schedulerobject.
-
setScheduler
public void setScheduler(LegacyScheduler scheduler)
setScheduler
- Parameters:
scheduler- aorg.opennms.netmgt.enlinkd.scheduler.Schedulerobject.
-
schedule
public void schedule()
schedule
-
isReady
public boolean isReady()
isReady
- Specified by:
isReadyin interfaceReadyRunnable- Returns:
- a boolean.
-
unschedule
public void unschedule()
-
suspend
public void suspend()
suspend
-
wakeUp
public void wakeUp()
wakeUp
-
getPollInterval
public long getPollInterval()
getPollInterval
- Returns:
- Returns the initial_sleep_time.
-
setPollInterval
public void setPollInterval(long interval)
setPollInterval
- Parameters:
interval- a long.
-
getInitialSleepTime
public long getInitialSleepTime()
getInitialSleepTime
- Returns:
- Returns the initial_sleep_time.
-
setInitialSleepTime
public void setInitialSleepTime(long initial_sleep_time)
setInitialSleepTime
- Parameters:
initial_sleep_time- The initial_sleep_timeto set.
-
-