org.apache.catalina.ha.deploy
public class WarWatcher extends Object
The WarWatcher watches the deployDir for changes made to the directory (adding new WAR files->deploy or remove WAR files->undeploy) And notifies a listener of the changes made
Version: 1.1
Nested Class Summary | |
---|---|
protected class | WarWatcher.WarFilter
File name filter for war files |
protected class | WarWatcher.WarInfo
File information on existing WAR files |
Field Summary | |
---|---|
protected Map | currentStatus
Currently deployed files |
protected FileChangeListener | listener
Parent to be notified of changes |
static Log | log |
protected File | watchDir
Directory to watch for war files |
Constructor Summary | |
---|---|
WarWatcher() | |
WarWatcher(FileChangeListener listener, File watchDir) |
Method Summary | |
---|---|
protected void | addWarInfo(File warfile)
add cluster war to the watcher state |
void | check()
check for modification and send notifcation to listener |
void | clear()
clear watcher state |
FileChangeListener | getListener() |
File | getWatchDir() |
void | setListener(FileChangeListener listener) |
void | setWatchDir(File watchDir) |
Parameters: warfile
Returns: Returns the listener.
Returns: Returns the watchDir.
Parameters: listener The listener to set.
Parameters: watchDir The watchDir to set.