public abstract class NodeDiscovery extends Object implements ReadyRunnable
Modifier and Type | Field and Description |
---|---|
protected EnhancedLinkd |
m_linkd |
protected Node |
m_node
The node ID of the system used to collect the SNMP information
|
Constructor and Description |
---|
NodeDiscovery(EnhancedLinkd linkd,
Node node)
Constructs a new SNMP collector for a node using the passed interface
as the collection point.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
abstract String |
getInfo()
getInfo
|
long |
getInitialSleepTime()
getInitialSleepTime
|
abstract String |
getName() |
int |
getNodeId() |
String |
getPackageName()
Getter for the field
packageName . |
SnmpAgentConfig |
getPeer()
getPeer
|
long |
getPollInterval()
getPollInterval
|
int |
getPort()
getPort
|
String |
getReadCommunity()
getReadCommunity
|
Scheduler |
getScheduler()
getScheduler
|
String |
getSysname() |
String |
getSysoid() |
InetAddress |
getTarget()
Returns the target address that the collection occurred for.
|
int |
hashCode() |
boolean |
isReady()
isReady
|
boolean |
isSuspended()
isSuspended
|
void |
reschedule() |
void |
run()
Performs the collection for the targeted IP address.
|
protected abstract void |
runCollection() |
void |
schedule()
schedule
|
protected void |
sendCompletedEvent(int nodeid) |
protected void |
sendStartEvent(int nodeid) |
protected void |
sendSuspendedEvent(int nodeid) |
void |
setInitialSleepTime(long initial_sleep_time)
setInitialSleepTime
|
void |
setPackageName(String pkgName)
setPackageName
|
void |
setPollInterval(long interval)
setPollInterval
|
void |
setScheduler(Scheduler scheduler)
setScheduler
|
void |
suspend()
suspend
|
void |
unschedule()
unschedule
|
void |
wakeUp()
wakeUp
|
protected final Node m_node
protected final EnhancedLinkd m_linkd
public NodeDiscovery(EnhancedLinkd linkd, Node node)
run
method is invoked.nodeid
- config
- The SnmpPeer object to collect from.public void run()
Performs the collection for the targeted IP 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.
protected void sendSuspendedEvent(int nodeid)
protected void sendStartEvent(int nodeid)
protected void sendCompletedEvent(int nodeid)
protected abstract void runCollection()
public void setScheduler(Scheduler scheduler)
setScheduler
scheduler
- a Scheduler
object.public void schedule()
schedule
schedule
in interface ReadyRunnable
public void reschedule()
public boolean isReady()
isReady
isReady
in interface ReadyRunnable
public boolean isSuspended()
isSuspended
isSuspended
in interface ReadyRunnable
public void suspend()
suspend
suspend
in interface ReadyRunnable
public void wakeUp()
wakeUp
wakeUp
in interface ReadyRunnable
public void unschedule()
unschedule
unschedule
in interface ReadyRunnable
public InetAddress getTarget()
InetAddress
object.public SnmpAgentConfig getPeer()
getPeer
SnmpAgentConfig
object.public int getPort()
getPort
public abstract String getInfo()
getInfo
getInfo
in interface ReadyRunnable
String
object.public String getPackageName()
Getter for the field packageName
.
getPackageName
in interface ReadyRunnable
String
object.public void setPackageName(String pkgName)
ReadyRunnable
setPackageName
setPackageName
in interface ReadyRunnable
pkgName
- a String
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 int getNodeId()
public String getSysoid()
public String getSysname()
public abstract String getName()
Copyright © 2017. All rights reserved.