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 boolean
equals(Object obj)
String
getInfo()
getInfolong
getInitialSleepTime()
getInitialSleepTimeabstract String
getName()
long
getPollInterval()
getPollIntervalLegacyScheduler
getScheduler()
getSchedulerint
hashCode()
boolean
isReady()
isReadyvoid
run()
abstract void
runDiscovery()
void
schedule()
schedulevoid
setInitialSleepTime(long initial_sleep_time)
setInitialSleepTimevoid
setPollInterval(long interval)
setPollIntervalvoid
setScheduler(LegacyScheduler scheduler)
setSchedulervoid
suspend()
suspendvoid
unschedule()
void
wakeUp()
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 therun
method 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.Scheduler
object.
-
setScheduler
public void setScheduler(LegacyScheduler scheduler)
setScheduler
- Parameters:
scheduler
- aorg.opennms.netmgt.enlinkd.scheduler.Scheduler
object.
-
schedule
public void schedule()
schedule
-
isReady
public boolean isReady()
isReady
- Specified by:
isReady
in 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.
-
-