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:
DiscardAwareFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
,FileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
public class SftpLastModifiedFileListFilter
extends 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
- Author:
- Adama Sorho, Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter
ONE_SECOND
-
Constructor Summary
ConstructorDescriptionSftpLastModifiedFileListFilter
(long age) Construct aSftpLastModifiedFileListFilter
instance with provided age.Construct aSftpLastModifiedFileListFilter
instance with provided age. -
Method Summary
Modifier and TypeMethodDescriptionprotected Instant
getLastModified
(org.apache.sshd.sftp.client.SftpClient.DirEntry remoteFile) Methods inherited from class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter
accept, addDiscardCallback, filterFiles, getAgeDuration, setAge, setAge, supportsSingleFileFiltering
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.integration.file.filters.FileListFilter
isForRecursion
-
Constructor Details
-
SftpLastModifiedFileListFilter
public SftpLastModifiedFileListFilter() -
SftpLastModifiedFileListFilter
public SftpLastModifiedFileListFilter(long age) Construct aSftpLastModifiedFileListFilter
instance with provided age. Defaults to 60 seconds.- Parameters:
age
- the age in seconds.
-
SftpLastModifiedFileListFilter
Construct aSftpLastModifiedFileListFilter
instance with provided age. Defaults to 60 seconds.- Parameters:
age
- the Duration
-
-
Method Details
-
getLastModified
- Specified by:
getLastModified
in classAbstractLastModifiedFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
-