Spring Integration

org.springframework.integration.file
Class RecursiveLeafOnlyDirectoryScanner

java.lang.Object
  extended by org.springframework.integration.file.DefaultDirectoryScanner
      extended by org.springframework.integration.file.RecursiveLeafOnlyDirectoryScanner
All Implemented Interfaces:
DirectoryScanner

public class RecursiveLeafOnlyDirectoryScanner
extends DefaultDirectoryScanner

DirectoryScanner that lists all files inside a directory and subdirectories, without limit. This scanner should not be used with directories that contain a vast number of files or on deep trees, as all the file names will be read into memory and the scanning will be done recursively.

Author:
Iwein Fuld

Constructor Summary
RecursiveLeafOnlyDirectoryScanner()
           
 
Method Summary
protected  java.io.File[] listEligibleFiles(java.io.File directory)
          Subclasses may refine the listing strategy by overriding this method.
 
Methods inherited from class org.springframework.integration.file.DefaultDirectoryScanner
listFiles, setFilter, setLocker, tryClaim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveLeafOnlyDirectoryScanner

public RecursiveLeafOnlyDirectoryScanner()
Method Detail

listEligibleFiles

protected java.io.File[] listEligibleFiles(java.io.File directory)
                                    throws java.lang.IllegalArgumentException
Description copied from class: DefaultDirectoryScanner
Subclasses may refine the listing strategy by overriding this method. The files returned here are passed onto the filter.

Overrides:
listEligibleFiles in class DefaultDirectoryScanner
Parameters:
directory - root directory to use for listing
Returns:
the files this scanner should consider
Throws:
java.lang.IllegalArgumentException

Spring Integration