uk.org.iscream.cms.server.client.monitors
Class Heartbeat__Monitor.HeartbeatWorker

java.lang.Object
  extended by java.lang.Thread
      extended by uk.org.iscream.cms.server.client.monitors.Heartbeat__Monitor.HeartbeatWorker
All Implemented Interfaces:
Runnable
Enclosing class:
Heartbeat__Monitor

private class Heartbeat__Monitor.HeartbeatWorker
extends Thread

This worker thread just checks all the hosts and then waits a period of time before doing it again. It sends Alerts as required.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private Heartbeat__Monitor.HeartbeatWorker()
           
 
Method Summary
private  boolean analyseHB(String source)
          Analyses a given host's state, and if need be generates a relevant Alert.
 void run()
          The main run method of this worker thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Heartbeat__Monitor.HeartbeatWorker

private Heartbeat__Monitor.HeartbeatWorker()
Method Detail

run

public void run()
The main run method of this worker thread. It simply checks through all the hosts it has stored, running the analyseHB method on each. It then removes any that have passed a FINAL, and waits a (configured) length of time before doing it again.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

analyseHB

private boolean analyseHB(String source)
Analyses a given host's state, and if need be generates a relevant Alert. Note that it also checks if the last alert sent is FINAL, in which case it returns true to indicate removal of this host.

Parameters:
source - the host to check
Returns:
whether this host can be deleted


Copyright © 2000-2003 i-scream. All Rights Reserved.