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
| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | WarWatcher.WarFilterFile name filter for war files | 
| protected static class  | WarWatcher.WarInfoFile information on existing WAR files | 
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.Map<java.lang.String,WarWatcher.WarInfo> | currentStatusCurrently deployed files | 
| protected FileChangeListener | listenerParent to be notified of changes | 
| protected java.io.File | watchDirDirectory to watch for war files | 
| Constructor and Description | 
|---|
| WarWatcher() | 
| WarWatcher(FileChangeListener listener,
java.io.File watchDir) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | addWarInfo(java.io.File warfile)add cluster war to the watcher state | 
| void | check()check for modification and send notification to listener | 
| void | clear()clear watcher state | 
| FileChangeListener | getListener() | 
| java.io.File | getWatchDir() | 
| void | setListener(FileChangeListener listener) | 
| void | setWatchDir(java.io.File watchDir) | 
protected java.io.File watchDir
protected FileChangeListener listener
protected java.util.Map<java.lang.String,WarWatcher.WarInfo> currentStatus
public WarWatcher()
public WarWatcher(FileChangeListener listener, java.io.File watchDir)
public void check()
protected void addWarInfo(java.io.File warfile)
warfile - public void clear()
public java.io.File getWatchDir()
public void setWatchDir(java.io.File watchDir)
watchDir - The watchDir to set.public FileChangeListener getListener()
public void setListener(FileChangeListener listener)
listener - The listener to set.Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.