java.lang.Runnable
public abstract class FileWatchdog
extends java.lang.Thread
doOnChange()
method.Modifier and Type | Field | Description |
---|---|---|
static long |
DEFAULT_DELAY |
The default delay between every file modification check, set to 60
seconds.
|
protected long |
delay |
The delay to observe between every check.
|
protected java.lang.String |
filename |
The name of the file to observe for changes.
|
Modifier | Constructor | Description |
---|---|---|
protected |
FileWatchdog(java.lang.String filename) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
checkAndConfigure() |
|
protected abstract void |
doOnChange() |
|
void |
run() |
|
void |
setDelay(long delay) |
Set the delay to observe between each check of the file changes.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final long DEFAULT_DELAY
protected java.lang.String filename
protected long delay
DEFAULT_DELAY
.public void setDelay(long delay)
protected abstract void doOnChange()
protected void checkAndConfigure()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Copyright 2000-2007 Apache Software Foundation.