Package org.fcrepo.kernel.api.utils
Class AutoReloadingConfiguration
java.lang.Object
org.fcrepo.kernel.api.utils.AutoReloadingConfiguration
- Direct Known Subclasses:
RdfNamespaceRegistry
Abstract configuration class which monitors a file path in order to reload the configuration when it changes.
- Author:
- bbpennel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Initialize the configuration and set up monitoringprotected abstract voidLoad the configuration file.voidsetConfigPath(String configPath) Set the file path for the configurationvoidsetMonitorForChanges(boolean monitorForChanges) Set whether to monitor the configuration file for changesvoidshutdown()Shut down the change monitoring thread
-
Field Details
-
configPath
-
-
Constructor Details
-
AutoReloadingConfiguration
public AutoReloadingConfiguration()
-
-
Method Details
-
init
Initialize the configuration and set up monitoring- Throws:
IOException- thrown if the configuration cannot be loaded.
-
shutdown
Shut down the change monitoring thread -
loadConfiguration
Load the configuration file.- Throws:
IOException- thrown if the configuration cannot be loaded.
-
setConfigPath
Set the file path for the configuration- Parameters:
configPath- file path for configuration
-
setMonitorForChanges
Set whether to monitor the configuration file for changes- Parameters:
monitorForChanges- flag controlling if to enable configuration monitoring
-