Package org.apache.commons.configuration2.builder

# Class DefaultReloadingDetectorFactory

java.lang.Object
org.apache.commons.configuration2.builder.DefaultReloadingDetectorFactory

All Implemented Interfaces:
  `ReloadingDetectorFactory`

public class DefaultReloadingDetectorFactory extends Object implements ReloadingDetectorFactory

A default implementation of the `ReloadingDetectorFactory` interface.

This factory creates objects of type `FileHandlerReloadingDetector`. Instances have no state and can be shared between multiple builders.

Since:
  2.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultReloadingDetectorFactory()`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ReloadingDetector`
  `createReloadingDetector(FileHandler handler, FileBasedBuilderParametersImpl params)`
  Creates a new `ReloadingDetector` object based on the passed in parameters.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultReloadingDetectorFactory

    public DefaultReloadingDetectorFactory()
    Constructs a new instance.

- ## Method Details

  - ### createReloadingDetector

    public ReloadingDetector createReloadingDetector(FileHandler handler, FileBasedBuilderParametersImpl params) throws ConfigurationException
    Description copied from interface: `ReloadingDetectorFactory`
    Creates a new `ReloadingDetector` object based on the passed in parameters. The `FileHandler` points to the file to be monitored. (It may be different from the `FileHandler` managed by the parameters object.) The `FileBasedBuilderParametersImpl` object may contain additional information for configuring the detector, for example a refresh delay.
    Specified by:
      `createReloadingDetector` in interface `ReloadingDetectorFactory`
    Parameters:
      `handler` - the handler of the file to be monitored
      `params` - parameters related to file-based configurations
    Returns:
      the newly created `ReloadingDetector`
    Throws:
      `ConfigurationException` - if an error occurs