public abstract class AbstractInboundFileSynchronizer<F> extends Object implements InboundFileSynchronizer, InitializingBean, IntegrationEvaluationContextAware
The implementation should run through any configured
FileListFilter
s to
ensure the file entry is acceptable.
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
AbstractInboundFileSynchronizer(SessionFactory<F> sessionFactory)
Create a synchronizer with the
SessionFactory used to acquire Session instances. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected List<F> |
filterFiles(F[] files) |
protected abstract String |
getFilename(F file) |
protected abstract long |
getModified(F file) |
protected String |
getTemporaryFileSuffix() |
protected abstract boolean |
isFile(F file) |
void |
setDeleteRemoteFiles(boolean deleteRemoteFiles) |
void |
setFilter(FileListFilter<F> filter) |
void |
setIntegrationEvaluationContext(EvaluationContext evaluationContext) |
void |
setLocalFilenameGeneratorExpression(Expression localFilenameGeneratorExpression) |
void |
setPreserveTimestamp(boolean preserveTimestamp) |
void |
setRemoteDirectory(String remoteDirectory)
Specify the full path to the remote directory.
|
void |
setRemoteFileSeparator(String remoteFileSeparator) |
void |
setTemporaryFileSuffix(String temporaryFileSuffix) |
void |
synchronizeToLocalDirectory(File localDirectory) |
public AbstractInboundFileSynchronizer(SessionFactory<F> sessionFactory)
SessionFactory
used to acquire Session
instances.sessionFactory
- The session factory.public void setRemoteFileSeparator(String remoteFileSeparator)
public void setLocalFilenameGeneratorExpression(Expression localFilenameGeneratorExpression)
public void setTemporaryFileSuffix(String temporaryFileSuffix)
public void setRemoteDirectory(String remoteDirectory)
remoteDirectory
- The remote directory.public void setFilter(FileListFilter<F> filter)
public void setDeleteRemoteFiles(boolean deleteRemoteFiles)
public void setPreserveTimestamp(boolean preserveTimestamp)
public void setIntegrationEvaluationContext(EvaluationContext evaluationContext)
setIntegrationEvaluationContext
in interface IntegrationEvaluationContextAware
public final void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
protected String getTemporaryFileSuffix()
public void synchronizeToLocalDirectory(File localDirectory)
synchronizeToLocalDirectory
in interface InboundFileSynchronizer
protected abstract boolean isFile(F file)
protected abstract long getModified(F file)