org.apache.logging.log4j.core.config
Class FileConfigurationMonitor

java.lang.Object
  extended by org.apache.logging.log4j.core.config.FileConfigurationMonitor
All Implemented Interfaces:
ConfigurationMonitor

public class FileConfigurationMonitor
extends Object
implements ConfigurationMonitor

Configuration monitor that periodically checks the timestamp of the configuration file and calls the ConfigurationListeners when an update occurs.


Constructor Summary
FileConfigurationMonitor(File file, List<ConfigurationListener> listeners, int interval)
          Constructor.
 
Method Summary
 void checkConfiguration()
          Called to determine if the configuration has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileConfigurationMonitor

public FileConfigurationMonitor(File file,
                                List<ConfigurationListener> listeners,
                                int interval)
Constructor.

Parameters:
file - The File to monitor.
listeners - The List of ConfigurationListeners to notify upon a change.
interval - The monitor interval in seconds. The minimum interval is 30 seconds.
Method Detail

checkConfiguration

public void checkConfiguration()
Called to determine if the configuration has changed.

Specified by:
checkConfiguration in interface ConfigurationMonitor


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.