Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.configuration.reloading
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.

Author:
  Nicolas De loof

Constructor Summary
`ManagedReloadingStrategy()`

Method Summary
`void` | `init()` Initialize the strategy.
`void` | `refresh()` Tells this strategy that the monitored configuration file should be refreshed.
`void` | `reloadingPerformed()` Notify the strategy that the file has been reloaded.
`boolean` | `reloadingRequired()` Checks whether reloading is required.
`void` | `setConfiguration(FileConfiguration configuration)` Sets the associated configuration.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ManagedReloadingStrategy

    public ManagedReloadingStrategy()

Method Detail

### init

    public void init()

  Description copied from interface: `ReloadingStrategy`
  Initialize the strategy.

  Specified by:
    `init` in interface `ReloadingStrategy`
  See Also:
    `ReloadingStrategy.init()`

### reloadingPerformed

    public void reloadingPerformed()

  Description copied from interface: `ReloadingStrategy`
  Notify the strategy that the file has been reloaded.

  Specified by:
    `reloadingPerformed` in interface `ReloadingStrategy`
  See Also:
    `ReloadingStrategy.reloadingPerformed()`

### reloadingRequired

    public boolean reloadingRequired()

  Checks whether reloading is required. This implementation checks whether the `refresh()` method has been invokded.

  Specified by:
    `reloadingRequired` in interface `ReloadingStrategy`
  Returns:
    a flag whether reloading is required
  See Also:
    `ReloadingStrategy.reloadingRequired()`

### setConfiguration

    public void setConfiguration(FileConfiguration configuration)

  Sets the associated configuration.

  Specified by:
    `setConfiguration` in interface `ReloadingStrategy`
  Parameters:
    `configuration` - the associated configuration

### refresh

    public void 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 interface `ManagedReloadingStrategyMBean`
  See Also:
    `ManagedReloadingStrategyMBean.refresh()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.