| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public static interface | |
| public static interface | Scanner.Listener
Listener Marker for notifications re file changes. |
| Modifier and Type | Field and Description |
|---|---|
| private static int | |
| private Map | |
| private FilenameFilter | |
| private List | |
| private Map | |
| private boolean | |
| private boolean | |
| private volatile boolean | |
| private List | |
| private int | |
| private TimerTask | |
| private Timer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| public FilenameFilter | |
| public boolean | |
| public File | |
| public List | |
| public int | |
| public Timer | |
| public TimerTask | |
| public synchronized void | |
| private void | |
| private void | |
| private void | |
| public void | reportDifferences(Map<K, V>
the info from the most recent pass currentScan, Map<K, V> info from the previous pass oldScan)Report the adds/changes/removes to the registered listeners |
| private void | |
| public void | |
| private void | |
| public void | Returns: Map of name of file to last modified timeRecursively scan all files in the designated directories. |
| public void | |
| public void | |
| public void | |
| public void | setReportExistingFilesOnStartup(boolean
if true, all files found on initial scan will be
reported as being added, otherwise not reportExisting)Whether or not an initial scan will report all files as being added. |
| public void | setScanDir(File dir)
Deprecated
use setScanDirs(List dirs) instead
Set the location of the directory to scan.
|
| public void | |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| private void |
| __scannerId | back to summary |
|---|---|
| private static int __scannerId | |
| _currentScan | back to summary |
|---|---|
| private Map<K, V> _currentScan | |
| _filter | back to summary |
|---|---|
| private FilenameFilter _filter | |
| _listeners | back to summary |
|---|---|
| private List<E> _listeners | |
| _prevScan | back to summary |
|---|---|
| private Map<K, V> _prevScan | |
| _recursive | back to summary |
|---|---|
| private boolean _recursive | |
| _reportExisting | back to summary |
|---|---|
| private boolean _reportExisting | |
| _running | back to summary |
|---|---|
| private volatile boolean _running | |
| _scanDirs | back to summary |
|---|---|
| private List<E> _scanDirs | |
| _scanInterval | back to summary |
|---|---|
| private int _scanInterval | |
| _task | back to summary |
|---|---|
| private TimerTask _task | |
| _timer | back to summary |
|---|---|
| private Timer _timer | |
| Scanner | back to summary |
|---|---|
| public Scanner() | |
| addListener | back to summary |
|---|---|
| public synchronized void addListener(Scanner. Add an added/removed/changed listener | |
| getFilenameFilter | back to summary |
|---|---|
| public FilenameFilter getFilenameFilter() Get any filter applied to files in the scan dir. | |
| getRecursive | back to summary |
|---|---|
| public boolean getRecursive() | |
| getScanDir | back to summary |
|---|---|
| public File getScanDir()
Deprecated use getScanDirs() instead Get the location of the directory to scan | |
| getScanDirs | back to summary |
|---|---|
| public List | |
| getScanInterval | back to summary |
|---|---|
| public int getScanInterval() Get the scan interval
| |
| newTimer | back to summary |
|---|---|
| public Timer newTimer() | |
| newTimerTask | back to summary |
|---|---|
| public TimerTask newTimerTask() | |
| removeListener | back to summary |
|---|---|
| public synchronized void removeListener(Scanner. Remove a registered listener | |
| reportAddition | back to summary |
|---|---|
| private void reportAddition(String filename) Report a file addition to the registered FileAddedListeners | |
| reportBulkChanges | back to summary |
|---|---|
| private void reportBulkChanges(List<E> filenames) | |
| reportChange | back to summary |
|---|---|
| private void reportChange(String filename) Report a file change to the FileChangedListeners | |
| reportDifferences | back to summary |
|---|---|
| public void reportDifferences(Map<K, V> currentScan, Map<K, V> oldScan) Report the adds/changes/removes to the registered listeners | |
| reportRemoval | back to summary |
|---|---|
| private void reportRemoval(String filename) Report a file removal to the FileRemovedListeners | |
| scan | back to summary |
|---|---|
| public void scan() Perform a pass of the scanner and report changes | |
| scanFile | back to summary |
|---|---|
| private void scanFile(File f, Map<K, V> scanInfoMap) Get last modified time on a single file or recurse if the file is a directory. | |
| scanFiles | back to summary |
|---|---|
| public void scanFiles() Recursively scan all files in the designated directories.
| |
| schedule | back to summary |
|---|---|
| public void schedule() | |
| setFilenameFilter | back to summary |
|---|---|
| public void setFilenameFilter(FilenameFilter filter) Apply a filter to files found in the scan directory. Only files matching the filter will be reported as added/changed/removed. | |
| setRecursive | back to summary |
|---|---|
| public void setRecursive(boolean recursive) | |
| setReportExistingFilesOnStartup | back to summary |
|---|---|
| public void setReportExistingFilesOnStartup(boolean reportExisting) Whether or not an initial scan will report all files as being added.
| |
| setScanDir | back to summary |
|---|---|
| public void setScanDir(File dir)
Deprecated use setScanDirs(List dirs) instead Set the location of the directory to scan. | |
| setScanDirs | back to summary |
|---|---|
| public void setScanDirs(List<E> dirs) | |
| setScanInterval | back to summary |
|---|---|
| public synchronized void setScanInterval(int scanInterval) Set the scan interval
| |
| start | back to summary |
|---|---|
| public synchronized void start() Start the scanning action. | |
| stop | back to summary |
|---|---|
| public synchronized void stop() Stop the scanning. | |
| warn | back to summary |
|---|---|
| private void warn(Object listener, String filename, Throwable th) | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| filesChanged | back to summary |
|---|---|
| public void filesChanged(List<E> filenames) throws Exception | |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void |
| fileAdded | back to summary |
|---|---|
| public void fileAdded(String filename) throws Exception | |
| fileChanged | back to summary |
|---|---|
| public void fileChanged(String filename) throws Exception | |
| fileRemoved | back to summary |
|---|---|
| public void fileRemoved(String filename) throws Exception | |