Package org.apache.catalina.ha.deploy
Class WarWatcher
java.lang.Object
org.apache.catalina.ha.deploy.WarWatcher
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.
- Author:
- Peter Rossbach
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
File name filter for war filesprotected static class
File information on existing WAR files -
Field Summary
Modifier and TypeFieldDescriptionprotected final Map
<String, WarWatcher.WarInfo> Currently deployed filesprotected final FileChangeListener
Parent to be notified of changesprotected final File
Directory to watch for war files -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addWarInfo
(File warfile) add cluster war to the watcher statevoid
check()
check for modification and send notification to listenervoid
clear()
clear watcher state
-
Field Details
-
watchDir
Directory to watch for war files -
listener
Parent to be notified of changes -
currentStatus
Currently deployed files
-
-
Constructor Details
-
WarWatcher
-
-
Method Details
-
check
public void check()check for modification and send notification to listener -
addWarInfo
add cluster war to the watcher state- Parameters:
warfile
- The WAR to add
-
clear
public void clear()clear watcher state
-