Scanner
Utility for scanning a directory for added, removed and changed
files and reporting these events via registered Listeners.
TODO AbstractLifeCycle
Get the scan interval
interval between scans in seconds
removeListener
public synchronized void removeListener(Listener listener)(Code)
Remove a registered listener
Parameters: listener - the Listener to be removed
reportDifferences
public void reportDifferences(Map currentScan, Map oldScan)(Code)
Report the adds/changes/removes to the registered listeners
Parameters: currentScan - the info from the most recent pass Parameters: oldScan - info from the previous pass
Apply a filter to files found in the scan directory.
Only files matching the filter will be reported as added/changed/removed.
Parameters: filter -
setReportExistingFilesOnStartup
public void setReportExistingFilesOnStartup(boolean reportExisting)(Code)
Whether or not an initial scan will report all files as being
added.
Parameters: reportExisting - if true, all files found on initial scan will be reported as being added, otherwise not