org.springframework.integration.file
Class AcceptOnceFileListFilter
java.lang.Object
org.springframework.integration.file.AbstractFileListFilter
org.springframework.integration.file.AcceptOnceFileListFilter
- All Implemented Interfaces:
- FileListFilter
public class AcceptOnceFileListFilter
- extends AbstractFileListFilter
FileListFilter
that passes files only one time. This can
conveniently be used to prevent duplication of files, as is done in
FileReadingMessageSource
.
This implementation is thread safe.
- Since:
- 1.0.0
- Author:
- Iwein Fuld
Method Summary |
protected boolean |
accept(File pathname)
Subclasses must implement this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AcceptOnceFileListFilter
public AcceptOnceFileListFilter(int maxCapacity)
- Creates an AcceptOnceFileFilter that is based on a bounded queue. If the
queue overflows, files that fall out will be passed through this filter
again if passed to the
AbstractFileListFilter.filterFiles(File[])
method.
- Parameters:
maxCapacity
- the maximum number of Files to maintain in the 'seen'
queue.
AcceptOnceFileListFilter
public AcceptOnceFileListFilter()
- Creates an AcceptOnceFileFilter based on an unbounded queue.
accept
protected boolean accept(File pathname)
- Description copied from class:
AbstractFileListFilter
- Subclasses must implement this method.
- Specified by:
accept
in class AbstractFileListFilter
Copyright © 2010. All Rights Reserved.