org.springframework.integration.file
Class HeadDirectoryScanner

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

public class HeadDirectoryScanner
extends DefaultDirectoryScanner

A custom scanner that only returns the first maxNumberOfFiles elements from a directory listing. This is useful to limit the number of File objects in memory and therefore mutually exclusive with AcceptOnceFileListFilter.

Since:
2.0

Constructor Summary
HeadDirectoryScanner(int maxNumberOfFiles)
           
 
Method Summary
 
Methods inherited from class org.springframework.integration.file.DefaultDirectoryScanner
listEligibleFiles, listFiles, setFilter, setLocker, tryClaim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeadDirectoryScanner

public HeadDirectoryScanner(int maxNumberOfFiles)