Class ManagedReloadingStrategy
java.lang.Object
org.apache.commons.configuration.reloading.ManagedReloadingStrategy
- All Implemented Interfaces:
ManagedReloadingStrategyMBean
,ReloadingStrategy
public class ManagedReloadingStrategy
extends Object
implements ReloadingStrategy, ManagedReloadingStrategyMBean
A strategy to reload configuration based on management requests. Designed for
JMX management.
- Version:
- $Id: ManagedReloadingStrategy.java 1210646 2011-12-05 21:25:01Z oheger $
- Author:
- Nicolas De loof
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
init()
Initialize the strategy.void
refresh()
Tells this strategy that the monitored configuration file should be refreshed.void
Notify the strategy that the file has been reloaded.boolean
Checks whether reloading is required.void
setConfiguration
(FileConfiguration configuration) Sets the associated configuration.
-
Constructor Details
-
ManagedReloadingStrategy
public ManagedReloadingStrategy()
-
-
Method Details
-
init
Description copied from interface:ReloadingStrategy
Initialize the strategy.- Specified by:
init
in interfaceReloadingStrategy
- See Also:
-
reloadingPerformed
Description copied from interface:ReloadingStrategy
Notify the strategy that the file has been reloaded.- Specified by:
reloadingPerformed
in interfaceReloadingStrategy
- See Also:
-
reloadingRequired
Checks whether reloading is required. This implementation checks whether therefresh()
method has been invoked.- Specified by:
reloadingRequired
in interfaceReloadingStrategy
- Returns:
- a flag whether reloading is required
- See Also:
-
setConfiguration
Sets the associated configuration.- Specified by:
setConfiguration
in interfaceReloadingStrategy
- Parameters:
configuration
- the associated configuration
-
refresh
Tells this strategy that the monitored configuration file should be refreshed. This method will typically be called from outside (through an exposed MBean) on behalf of an administrator.- Specified by:
refresh
in interfaceManagedReloadingStrategyMBean
- See Also:
-