public abstract class Watchdog
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
class |
Watchdog.Sheep
Represents a monitored task.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOGGER |
protected java.lang.Thread |
thread |
| Modifier | Constructor and Description |
|---|---|
protected |
Watchdog(long watchdogPeriod) |
| Modifier and Type | Method and Description |
|---|---|
Watchdog.Sheep |
createSheep(java.lang.String name,
long worstFrequency)
Declare a new activity to monitor.
|
protected abstract void |
heartbeat()
Called every
#watchdogPeriodms if at least one sheep is OK |
void |
run() |
void |
start() |
void |
stop() |
protected abstract void |
timeout(Watchdog.Sheep sheep)
Called when a sheep is not OK.
|
public static final org.apache.commons.logging.Log LOGGER
protected java.lang.Thread thread
public Watchdog.Sheep createSheep(java.lang.String name, long worstFrequency)
public void start()
public void stop()
public void run()
run in interface java.lang.Runnableprotected abstract void heartbeat()
throws java.io.IOException,
java.lang.ClassNotFoundException
#watchdogPeriodms if at least one sheep is OKjava.io.IOExceptionjava.lang.ClassNotFoundExceptionprotected abstract void timeout(Watchdog.Sheep sheep)