Class S3InboundFileSynchronizer

java.lang.Object
org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
org.springframework.integration.aws.inbound.S3InboundFileSynchronizer
All Implemented Interfaces:
Closeable, AutoCloseable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.integration.file.remote.synchronizer.InboundFileSynchronizer

public class S3InboundFileSynchronizer extends org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
An implementation of AbstractInboundFileSynchronizer for Amazon S3.
Author:
Artem Bilan
  • Field Summary

    Fields inherited from class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer

    EXPRESSION_PARSER, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    S3InboundFileSynchronizer(org.springframework.integration.file.remote.session.SessionFactory<software.amazon.awssdk.services.s3.model.S3Object> sessionFactory)
    Create a synchronizer with the SessionFactory used to acquire Session instances.
    S3InboundFileSynchronizer(software.amazon.awssdk.services.s3.S3Client amazonS3)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    copyFileToLocalDirectory(String remoteDirectoryPath, org.springframework.expression.EvaluationContext localFileEvaluationContext, software.amazon.awssdk.services.s3.model.S3Object remoteFile, File localDirectory, org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object> session)
     
    protected String
    getFilename(software.amazon.awssdk.services.s3.model.S3Object file)
     
    protected long
    getModified(software.amazon.awssdk.services.s3.model.S3Object file)
     
    protected boolean
    isFile(software.amazon.awssdk.services.s3.model.S3Object file)
     
    protected String
     

    Methods inherited from class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer

    afterPropertiesSet, close, doInit, doSetFilter, doSetRemoteDirectoryExpression, filterFiles, getComparator, getRemoteFileMetadata, getTemporaryFileSuffix, removeRemoteFileMetadata, rollbackFromFileToListEnd, setBeanFactory, setBeanName, setComparator, setDeleteRemoteFiles, setFilter, setLocalFilenameGeneratorExpression, setLocalFilenameGeneratorExpressionString, setMetadataStorePrefix, setPreserveTimestamp, setRemoteDirectory, setRemoteDirectoryExpression, setRemoteDirectoryExpressionString, setRemoteFileMetadataStore, setRemoteFileSeparator, setTemporaryFileSuffix, synchronizeToLocalDirectory, synchronizeToLocalDirectory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • S3InboundFileSynchronizer

      public S3InboundFileSynchronizer()
    • S3InboundFileSynchronizer

      public S3InboundFileSynchronizer(software.amazon.awssdk.services.s3.S3Client amazonS3)
    • S3InboundFileSynchronizer

      public S3InboundFileSynchronizer(org.springframework.integration.file.remote.session.SessionFactory<software.amazon.awssdk.services.s3.model.S3Object> sessionFactory)
      Create a synchronizer with the SessionFactory used to acquire Session instances.
      Parameters:
      sessionFactory - The session factory.
  • Method Details

    • isFile

      protected boolean isFile(software.amazon.awssdk.services.s3.model.S3Object file)
      Specified by:
      isFile in class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
    • getFilename

      protected String getFilename(software.amazon.awssdk.services.s3.model.S3Object file)
      Specified by:
      getFilename in class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
    • getModified

      protected long getModified(software.amazon.awssdk.services.s3.model.S3Object file)
      Specified by:
      getModified in class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
    • copyFileToLocalDirectory

      protected boolean copyFileToLocalDirectory(String remoteDirectoryPath, @Nullable org.springframework.expression.EvaluationContext localFileEvaluationContext, software.amazon.awssdk.services.s3.model.S3Object remoteFile, File localDirectory, org.springframework.integration.file.remote.session.Session<software.amazon.awssdk.services.s3.model.S3Object> session) throws IOException
      Overrides:
      copyFileToLocalDirectory in class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
      Throws:
      IOException
    • protocol

      protected String protocol()
      Specified by:
      protocol in class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>