org.apache.commons.configuration.reloading
Class FileAlwaysReloadingStrategy

java.lang.Object
  extended by org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
      extended by org.apache.commons.configuration.reloading.FileAlwaysReloadingStrategy
All Implemented Interfaces:
ReloadingStrategy

public class FileAlwaysReloadingStrategy
extends FileChangedReloadingStrategy

A specialized reloading strategy for files that will always report a change of the monitored file. Thus it is well suited for testing reloading operations on file-based configurations.

Version:
$Id: FileAlwaysReloadingStrategy.java 1301995 2012-03-17 20:24:16Z sebb $

Field Summary
 
Fields inherited from class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
configuration, lastChecked, lastModified, refreshDelay
 
Constructor Summary
FileAlwaysReloadingStrategy()
           
 
Method Summary
 File getMonitoredFile()
          Returns the file that is watched by this strategy.
 boolean reloadingRequired()
          Checks whether a reload is necessary.
 
Methods inherited from class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
getFile, getRefreshDelay, hasChanged, init, reloadingPerformed, setConfiguration, setRefreshDelay, updateLastModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileAlwaysReloadingStrategy

public FileAlwaysReloadingStrategy()
Method Detail

reloadingRequired

public boolean reloadingRequired()
Checks whether a reload is necessary. This implementation returns always true.

Specified by:
reloadingRequired in interface ReloadingStrategy
Overrides:
reloadingRequired in class FileChangedReloadingStrategy
Returns:
a flag whether a reload is required

getMonitoredFile

public File getMonitoredFile()
Returns the file that is watched by this strategy.

Returns:
the monitored file


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