org.apache.log4j.helpers
Class FileWatchdog
Thread
org.apache.log4j.helpers.FileWatchdog
public abstract class FileWatchdog
extends Thread
Check every now and then that a certain file has not changed. If it
has, then call the
doOnChange()
method.
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 String | filename - The name of the file to observe for changes.
|
DEFAULT_DELAY
public static final long DEFAULT_DELAY
The default delay between every file modification check, set to 60
seconds.
delay
protected long delay
The delay to observe between every check. By default set
DEFAULT_DELAY
.
filename
protected String filename
The name of the file to observe for changes.
FileWatchdog
protected FileWatchdog(String filename)
checkAndConfigure
protected void checkAndConfigure()
doOnChange
protected abstract void doOnChange()
setDelay
public void setDelay(long delay)
Set the delay to observe between each check of the file changes.
Copyright 2000-2005 Apache Software Foundation.