Package adams.core.io.filechanged
Interface FileChangeMonitor
-
- All Known Implementing Classes:
AbstractFileChangeMonitor,AbstractMessageDigestBasedMonitor,FlowFileDigest,LastModified,MessageDigest,MultiMonitor,NoChange,Size
public interface FileChangeMonitorInterface for file change monitors.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FilegetMonitoredFile()Returns the file that is being monitored.booleanhasChanged(File file)Checks whether the file has changed.Stringinitialize(File file)Initializes the monitor with the specified file.booleanisInitialized(File file)Checks whether the monitor has been initialized with the specified file.Stringupdate(File file)Updates the monitor with the specified file.
-
-
-
Method Detail
-
isInitialized
boolean isInitialized(File file)
Checks whether the monitor has been initialized with the specified file.- Parameters:
file- the file to check- Returns:
- true if setup for this file
- See Also:
initialize(File)
-
initialize
String initialize(File file)
Initializes the monitor with the specified file.- Parameters:
file- the file to initialize with- Returns:
- null if successful, otherwise error message
-
getMonitoredFile
File getMonitoredFile()
Returns the file that is being monitored.- Returns:
- the file, null if not initialized
-
hasChanged
boolean hasChanged(File file)
Checks whether the file has changed. Must be initialized beforehand.- Parameters:
file- the file to check- Returns:
- true if changed
- See Also:
isInitialized(File),initialize(File)
-
-