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

    • FtpLastModifiedFileListFilter

      public FtpLastModifiedFileListFilter()
    • FtpLastModifiedFileListFilter

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

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

    • getLastModified

      protected Instant getLastModified(org.apache.commons.net.ftp.FTPFile remoteFile)
      Specified by:
      getLastModified in class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<org.apache.commons.net.ftp.FTPFile>