Package adams.core.io.filechanged
Interface FileChangeMonitor
-
- All Known Implementing Classes:
AbstractFileChangeMonitor
,AbstractMessageDigestBasedMonitor
,FlowFileDigest
,LastModified
,MessageDigest
,MultiMonitor
,NoChange
,Size
public interface FileChangeMonitor
Interface 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 File
getMonitoredFile()
Returns the file that is being monitored.boolean
hasChanged(File file)
Checks whether the file has changed.String
initialize(File file)
Initializes the monitor with the specified file.boolean
isInitialized(File file)
Checks whether the monitor has been initialized with the specified file.String
update(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)
-
-