org.springframework.integration.file.remote.synchronizer
Class AbstractInboundFileSynchronizer<F>
java.lang.Object
org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer<F>
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, InboundFileSynchronizer
- Direct Known Subclasses:
- FtpInboundFileSynchronizer, SftpInboundFileSynchronizer
public abstract class AbstractInboundFileSynchronizer<F>
- extends java.lang.Object
- implements InboundFileSynchronizer, org.springframework.beans.factory.InitializingBean
Base class charged with knowing how to connect to a remote file system,
scan it for new files and then download the files.
The implementation should run through any configured
FileListFilter
s to
ensure the file entry is acceptable.
- Since:
- 2.0
- Author:
- Josh Long, Mark Fisher, Oleg Zhurakousky
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
AbstractInboundFileSynchronizer
public AbstractInboundFileSynchronizer(SessionFactory<F> sessionFactory)
- Create a synchronizer with the
SessionFactory
used to acquire Session
instances.
setRemoteFileSeparator
public void setRemoteFileSeparator(java.lang.String remoteFileSeparator)
setLocalFilenameGeneratorExpression
public void setLocalFilenameGeneratorExpression(org.springframework.expression.Expression localFilenameGeneratorExpression)
setTemporaryFileSuffix
public void setTemporaryFileSuffix(java.lang.String temporaryFileSuffix)
setRemoteDirectory
public void setRemoteDirectory(java.lang.String remoteDirectory)
- Specify the full path to the remote directory.
setFilter
public void setFilter(FileListFilter<F> filter)
setDeleteRemoteFiles
public void setDeleteRemoteFiles(boolean deleteRemoteFiles)
afterPropertiesSet
public final void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
filterFiles
protected final java.util.List<F> filterFiles(F[] files)
getTemporaryFileSuffix
protected java.lang.String getTemporaryFileSuffix()
synchronizeToLocalDirectory
public void synchronizeToLocalDirectory(java.io.File localDirectory)
- Specified by:
synchronizeToLocalDirectory
in interface InboundFileSynchronizer
isFile
protected abstract boolean isFile(F file)
getFilename
protected abstract java.lang.String getFilename(F file)