|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ace.configurator.Configurator
public class Configurator
Configures bundles managed by the ConfigurationAdmin
. This Configurator uses text files as configuration
files containing properties. When a configuration file is added, the properties are being read and added. If the config file is
removed, the properties are removed as well.
The configuration files should be stored in the configuration directory (often the 'conf' directory) of the OSGi framework and should have the format: <pid>.cfg
Note: this Configurator is based upon the principle in the FileInstall bundle Peter Kriens wrote. (see http://www.aqute.biz/Code/FileInstall for more information)
Constructor Summary | |
---|---|
Configurator(File dir,
long pollInterval,
boolean reconfig)
Instantiates a new configurator. |
Method Summary | |
---|---|
protected void |
deleteConfig(String pid,
String factoryPid)
Removes a configuration from ConfigAdmin. |
protected String |
parsePid(File file)
Remove the config extension (.cfg) and return the resulting String. |
void |
run()
Starts the actual Timer task, and calls the configurator to make sure the configurations are performed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Configurator(File dir, long pollInterval, boolean reconfig)
dir
- The directory to watch.pollInterval
- The poll iterval in ms.reconfig
- Whether or not to use reconfiguration: if false
, existing configuration
values will not be overwritten, only new values (for a given pid) will be added.Method Detail |
---|
public void run()
run
in interface Runnable
protected void deleteConfig(String pid, String factoryPid)
protected String parsePid(File file)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |