|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DirectoryScanner
Strategy for scanning directories. Implementations may select all children and grandchildren of the scanned directory in any order. This interface is intended to enable the customization of selection, locking and ordering of files in a directory like RecursiveDirectoryScanner. If the only requirement is to ignore certain files a EntryListFilter implementation should suffice.
Method Summary | |
---|---|
java.util.List<java.io.File> |
listFiles(java.io.File directory)
Scans the directory according to the strategy particular to this implementation and returns the selected files as a File array. |
void |
setFilter(FileListFilter<java.io.File> filter)
Sets a custom filter to be used by this scanner. |
void |
setLocker(FileLocker locker)
Sets a custom locker to be used by this scanner. |
boolean |
tryClaim(java.io.File file)
Claim the file to process. |
Method Detail |
---|
java.util.List<java.io.File> listFiles(java.io.File directory) throws java.lang.IllegalArgumentException
directory
- the directory to scan for files
java.lang.IllegalArgumentException
- if the input is incorrectvoid setFilter(FileListFilter<java.io.File> filter)
filter
- the custom filter to be usedvoid setLocker(FileLocker locker)
locker
- the custom locker to be usedboolean tryClaim(java.io.File file)
lock
method
and MUST return false if the locker did not grant the lock.
- Parameters:
file
- file to be claimed
- Returns:
- true if the claim was granted false otherwise
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |