public class ActionConfigurator extends Object implements ConfigurationObservableIF
Modifier and Type | Field and Description |
---|---|
protected String |
contextPath |
protected long |
delay |
protected String |
fileName |
protected boolean |
logErrors |
protected Collection |
observers |
protected String |
realPath |
protected ActionRegistryIF |
registry |
Constructor and Description |
---|
ActionConfigurator(String contextPath,
String realPath,
String fileName)
Constructor which allows to specify the path of the servlet
context and the configuration file name.
|
ActionConfigurator(String contextPath,
String realPath,
String fileName,
long delay)
See
ActionConfigurator(String, String, String) with automatic
observation for changes of the configuration file. |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(ConfigurationObserverIF o)
Adds an observer to the set of observers for this object.
|
String |
getFileName() |
ActionRegistryIF |
getRegistry() |
void |
logErrors(boolean logErrors) |
protected void |
notifyObserversConfigurationChanged()
Loops through and notifies each observer if a new item was
detected.
|
void |
readAndWatchRegistry() |
void |
readRegistryConfiguration()
Reads in configuration file and try to generate a action registry
object.
|
void |
removeObserver(ConfigurationObserverIF o)
Removes an observer from the set of observers of this object.
|
String |
toString() |
protected String contextPath
protected String realPath
protected String fileName
protected long delay
protected ActionRegistryIF registry
protected Collection observers
protected boolean logErrors
public ActionConfigurator(String contextPath, String realPath, String fileName)
public ActionConfigurator(String contextPath, String realPath, String fileName, long delay)
ActionConfigurator(String, String, String)
with automatic
observation for changes of the configuration file.delay
- - The delay in milliseconds between file change
observations.public void logErrors(boolean logErrors)
public void readAndWatchRegistry()
public String getFileName()
public ActionRegistryIF getRegistry()
public void addObserver(ConfigurationObserverIF o)
ConfigurationObservableIF
addObserver
in interface ConfigurationObservableIF
public void removeObserver(ConfigurationObserverIF o)
ConfigurationObservableIF
removeObserver
in interface ConfigurationObservableIF
public void readRegistryConfiguration()
protected void notifyObserversConfigurationChanged()