protected class ComponentConfigBean.WatchDog extends Object
This inner class watches for changes in a array of ConfigBean.ConfigDefinition
's.
This collection defines the configuration files that the Clay
component uses.
Constructor and Description |
---|
ComponentConfigBean.WatchDog(ConfigBean.ConfigDefinition[] configDefs,
String name)
Overloaded constructor that is passed the configuration file
definitions as a parameter.
|
public ComponentConfigBean.WatchDog(ConfigBean.ConfigDefinition[] configDefs, String name)
Overloaded constructor that is passed the configuration file definitions as a parameter. The name associated with the resource watcher is also passed as a parameter.
configDefs
- files in the watch groupname
- the watch group namepublic String getName()
Returns the name of the resource watcher.
public void destroy()
This method is invoked to dereference the private array of config file definitions.
public boolean refresh(boolean forceReload)
This method is the watch dog timmer. It's invoked to determine
if any of the files have changed since the last time they were loaded.
If a change has occured on any of the configDefs
or
the forceReload
param is true
, all the
files are reloaded and the last modified date is reset in the
ConfigBean.ConfigDefinition
. A true
value is
returned if the files were refreshed.
forceReload
- reload the group of config filestrue
if the group was reloadedCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.