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
ConstructorsConstructorDescriptionS3InboundFileSynchronizer
(org.springframework.integration.file.remote.session.SessionFactory<software.amazon.awssdk.services.s3.model.S3Object> sessionFactory) Create a synchronizer with theSessionFactory
used to acquireSession
instances.S3InboundFileSynchronizer
(software.amazon.awssdk.services.s3.S3Client amazonS3) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
protocol()
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
-
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 theSessionFactory
used to acquireSession
instances.- Parameters:
sessionFactory
- The session factory.
-
-
Method Details
-
isFile
protected boolean isFile(software.amazon.awssdk.services.s3.model.S3Object file) - Specified by:
isFile
in classorg.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
-
getFilename
- Specified by:
getFilename
in classorg.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 classorg.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 classorg.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
- Throws:
IOException
-
protocol
- Specified by:
protocol
in classorg.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<software.amazon.awssdk.services.s3.model.S3Object>
-