Package org.apache.catalina.ha.deploy
Class WarWatcher
- java.lang.Object
-
- org.apache.catalina.ha.deploy.WarWatcher
-
public class WarWatcher extends java.lang.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
- Author:
- Peter Rossbach
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
WarWatcher.WarFilter
File name filter for war filesprotected static class
WarWatcher.WarInfo
File information on existing WAR files
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,WarWatcher.WarInfo>
currentStatus
Currently deployed filesprotected FileChangeListener
listener
Parent to be notified of changesprotected java.io.File
watchDir
Directory to watch for war files
-
Constructor Summary
Constructors Constructor Description WarWatcher(FileChangeListener listener, java.io.File watchDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addWarInfo(java.io.File warfile)
add cluster war to the watcher statevoid
check()
check for modification and send notification to listenervoid
clear()
clear watcher state
-
-
-
Field Detail
-
watchDir
protected final java.io.File watchDir
Directory to watch for war files
-
listener
protected final FileChangeListener listener
Parent to be notified of changes
-
currentStatus
protected final java.util.Map<java.lang.String,WarWatcher.WarInfo> currentStatus
Currently deployed files
-
-
Constructor Detail
-
WarWatcher
public WarWatcher(FileChangeListener listener, java.io.File watchDir)
-
-