jetbrains.buildServer.configuration
Class FileWatcher

java.lang.Object
  extended by jetbrains.buildServer.configuration.ChangeObserver
      extended by jetbrains.buildServer.configuration.FileWatcher
All Implemented Interfaces:
ChangeProvider

public class FileWatcher
extends ChangeObserver
implements ChangeProvider

Watches for changes in one file.


Constructor Summary
FileWatcher(java.io.File file)
           
 
Method Summary
 boolean changesDetected()
          Returns true if changes in file detected
 java.io.File getFile()
           
 java.lang.String getRequestor()
          Returns (short) string representation of this change source
 void resetChanged()
          Call to reset changes status
 
Methods inherited from class jetbrains.buildServer.configuration.ChangeObserver
checkForModifications, clear, getSleepingPeriod, registerChangeProvider, registerListener, runActionWithDisabledObserver, setSkipListenersNotification, setSleepingPeriod, shutdownAll, start, stop, unregisterChangeProvider, unregisterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileWatcher

public FileWatcher(java.io.File file)
Parameters:
file - file to watch changes in. May denote a directory as well, its lastModified attribute will be monitored for the change
Method Detail

changesDetected

public boolean changesDetected()
Returns true if changes in file detected

Specified by:
changesDetected in interface ChangeProvider
Returns:
true if changes in file detected
See Also:
ChangeProvider.resetChanged()

resetChanged

public void resetChanged()
Call to reset changes status

Specified by:
resetChanged in interface ChangeProvider

getRequestor

public java.lang.String getRequestor()
Description copied from interface: ChangeProvider
Returns (short) string representation of this change source

Specified by:
getRequestor in interface ChangeProvider
Returns:
(short) string representation of this change source

getFile

public java.io.File getFile()
Returns:
monitored file