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
  • Constructor Details

    • SftpLastModifiedFileListFilter

      public SftpLastModifiedFileListFilter()
    • SftpLastModifiedFileListFilter

      public SftpLastModifiedFileListFilter(long age)
      Construct a SftpLastModifiedFileListFilter instance with provided age. Defaults to 60 seconds.
      Parameters:
      age - the age in seconds.
    • SftpLastModifiedFileListFilter

      public SftpLastModifiedFileListFilter(Duration age)
      Construct a SftpLastModifiedFileListFilter instance with provided age. Defaults to 60 seconds.
      Parameters:
      age - the Duration
  • Method Details

    • getLastModified

      protected Instant getLastModified(org.apache.sshd.sftp.client.SftpClient.DirEntry remoteFile)
      Specified by:
      getLastModified in class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>