Class SftpLastModifiedFileListFilter
java.lang.Object
org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
org.springframework.integration.sftp.filters.SftpLastModifiedFileListFilter
- All Implemented Interfaces:
org.springframework.integration.file.filters.DiscardAwareFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>,org.springframework.integration.file.filters.FileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
public class SftpLastModifiedFileListFilter
extends org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
The
AbstractLastModifiedFileListFilter implementation to filter those files which
FileTime.toInstant() 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
ConstructorsConstructorDescriptionSftpLastModifiedFileListFilter(long age) Construct aSftpLastModifiedFileListFilterinstance with provided age.Construct aSftpLastModifiedFileListFilterinstance with provided age. -
Method Summary
Modifier and TypeMethodDescriptionprotected InstantgetLastModified(org.apache.sshd.sftp.client.SftpClient.DirEntry 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
-
SftpLastModifiedFileListFilter
public SftpLastModifiedFileListFilter() -
SftpLastModifiedFileListFilter
public SftpLastModifiedFileListFilter(long age) Construct aSftpLastModifiedFileListFilterinstance with provided age. Defaults to 60 seconds.- Parameters:
age- the age in seconds.
-
SftpLastModifiedFileListFilter
Construct aSftpLastModifiedFileListFilterinstance 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.sshd.sftp.client.SftpClient.DirEntry>
-