|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.Descriptor<NodeMonitor>
hudson.node_monitors.AbstractNodeMonitorDescriptor<T>
public abstract class AbstractNodeMonitorDescriptor<T>
Convenient base class for common NodeMonitor
implementation
where the "monitoring" consists of executing something periodically on every node
and taking some action based on its result.
"T" represents the the result of the monitoring.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class hudson.model.Descriptor |
---|
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self |
Field Summary |
---|
Fields inherited from class hudson.model.Descriptor |
---|
clazz |
Fields inherited from interface hudson.model.Saveable |
---|
NOOP |
Constructor Summary | |
---|---|
protected |
AbstractNodeMonitorDescriptor()
|
protected |
AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz)
|
protected |
AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz,
long interval)
|
protected |
AbstractNodeMonitorDescriptor(long interval)
|
Method Summary | |
---|---|
T |
get(Computer c)
Obtains the monitoring result currently available, or null if no data is available. |
boolean |
isIgnored()
Is this monitor currently ignored? |
protected boolean |
markOffline(Computer c)
Deprecated. as of 1.320 Use markOffline(Computer, OfflineCause) to specify the cause. |
protected boolean |
markOffline(Computer c,
OfflineCause oc)
Utility method to mark the computer offline for derived classes. |
protected boolean |
markOnline(Computer c)
Utility method to mark the computer online for derived classes. |
protected abstract T |
monitor(Computer c)
Performs monitoring of the given computer object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractNodeMonitorDescriptor()
protected AbstractNodeMonitorDescriptor(long interval)
protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz)
protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz, long interval)
Method Detail |
---|
protected abstract T monitor(Computer c) throws IOException, InterruptedException
get(Computer)
method.
If null is returned, it will be interpreted as "no observed value." This is
convenient way of abandoning the observation on a particular computer,
whereas IOException
is useful for indicating a hard error that needs to be
corrected.
IOException
InterruptedException
public T get(Computer c)
If no data is available, a background task to collect data will be started.
public boolean isIgnored()
protected boolean markOnline(Computer c)
protected boolean markOffline(Computer c, OfflineCause oc)
protected boolean markOffline(Computer c)
markOffline(Computer, OfflineCause)
to specify the cause.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |