Class FtpLastModifiedFileListFilter
java.lang.Object
org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<org.apache.commons.net.ftp.FTPFile>
org.springframework.integration.ftp.filters.FtpLastModifiedFileListFilter
- All Implemented Interfaces:
org.springframework.integration.file.filters.DiscardAwareFileListFilter<org.apache.commons.net.ftp.FTPFile>,org.springframework.integration.file.filters.FileListFilter<org.apache.commons.net.ftp.FTPFile>
public class FtpLastModifiedFileListFilter
extends org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<org.apache.commons.net.ftp.FTPFile>
The
AbstractLastModifiedFileListFilter implementation to filter those files which
FTPFile.getTimestampInstant() is less than the age in comparison with the Instant.now().
When discardCallback AbstractLastModifiedFileListFilter.addDiscardCallback(Consumer) is provided, it called for all the rejected files.- Since:
- 6.2
-
Field Summary
Fields inherited from class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter
ONE_SECOND -
Constructor Summary
ConstructorsConstructorDescriptionFtpLastModifiedFileListFilter(long age) Construct aFtpLastModifiedFileListFilterinstance with provided age.Construct aFtpLastModifiedFileListFilterinstance with provided age. -
Method Summary
Modifier and TypeMethodDescriptionprotected InstantgetLastModified(org.apache.commons.net.ftp.FTPFile remoteFile) Methods inherited from class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter
accept, addDiscardCallback, filterFiles, getAgeDuration, setAge, setAge, supportsSingleFileFilteringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.file.filters.FileListFilter
isForRecursion
-
Constructor Details
-
FtpLastModifiedFileListFilter
public FtpLastModifiedFileListFilter() -
FtpLastModifiedFileListFilter
public FtpLastModifiedFileListFilter(long age) Construct aFtpLastModifiedFileListFilterinstance with provided age. Defaults to 60 seconds.- Parameters:
age- the age in seconds.
-
FtpLastModifiedFileListFilter
Construct aFtpLastModifiedFileListFilterinstance with provided age. Defaults to 60 seconds.- Parameters:
age- the Duration
-
-
Method Details
-
getLastModified
- Specified by:
getLastModifiedin classorg.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<org.apache.commons.net.ftp.FTPFile>
-