Class SftpInboundFileSynchronizer
java.lang.Object
org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizer
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Aware
,BeanFactoryAware
,BeanNameAware
,InitializingBean
,InboundFileSynchronizer
public class SftpInboundFileSynchronizer extends AbstractInboundFileSynchronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
Handles the synchronization between a remote SFTP directory and a local mount.
- Since:
- 2.0
- Author:
- Josh Long, Oleg Zhurakousky, Mark Fisher, Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer
EXPRESSION_PARSER, logger
-
Constructor Summary
Constructors Constructor Description SftpInboundFileSynchronizer(SessionFactory<com.jcraft.jsch.ChannelSftp.LsEntry> sessionFactory)
Create a synchronizer with theSessionFactory
used to acquireSession
instances. -
Method Summary
Modifier and Type Method Description protected String
getFilename(com.jcraft.jsch.ChannelSftp.LsEntry file)
protected long
getModified(com.jcraft.jsch.ChannelSftp.LsEntry file)
protected boolean
isFile(com.jcraft.jsch.ChannelSftp.LsEntry file)
protected String
protocol()
Return the protocol this synchronizer works with.Methods inherited from class org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer
afterPropertiesSet, close, copyFileToLocalDirectory, 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
-
SftpInboundFileSynchronizer
public SftpInboundFileSynchronizer(SessionFactory<com.jcraft.jsch.ChannelSftp.LsEntry> sessionFactory)Create a synchronizer with theSessionFactory
used to acquireSession
instances.- Parameters:
sessionFactory
- The session factory.
-
-
Method Details
-
isFile
protected boolean isFile(com.jcraft.jsch.ChannelSftp.LsEntry file)- Specified by:
isFile
in classAbstractInboundFileSynchronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
-
getFilename
- Specified by:
getFilename
in classAbstractInboundFileSynchronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
-
getModified
protected long getModified(com.jcraft.jsch.ChannelSftp.LsEntry file)- Specified by:
getModified
in classAbstractInboundFileSynchronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
-
protocol
Description copied from class:AbstractInboundFileSynchronizer
Return the protocol this synchronizer works with.- Specified by:
protocol
in classAbstractInboundFileSynchronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
- Returns:
- the protocol this synchronizer works with.
-