public abstract class AbstractInboundFileSynchronizer<F> extends java.lang.Object implements InboundFileSynchronizer, org.springframework.beans.factory.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 java.util.List<F> |
filterFiles(F[] files) |
protected abstract java.lang.String |
getFilename(F file) |
protected abstract long |
getModified(F file) |
protected java.lang.String |
getTemporaryFileSuffix() |
protected abstract boolean |
isFile(F file) |
void |
setDeleteRemoteFiles(boolean deleteRemoteFiles) |
void |
setFilter(FileListFilter<F> filter) |
void |
setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext) |
void |
setLocalFilenameGeneratorExpression(org.springframework.expression.Expression localFilenameGeneratorExpression) |
void |
setPreserveTimestamp(boolean preserveTimestamp) |
void |
setRemoteDirectory(java.lang.String remoteDirectory)
Specify the full path to the remote directory.
|
void |
setRemoteFileSeparator(java.lang.String remoteFileSeparator) |
void |
setTemporaryFileSuffix(java.lang.String temporaryFileSuffix) |
void |
synchronizeToLocalDirectory(java.io.File localDirectory) |
public AbstractInboundFileSynchronizer(SessionFactory<F> sessionFactory)
SessionFactory
used to acquire Session
instances.public void setRemoteFileSeparator(java.lang.String remoteFileSeparator)
public void setLocalFilenameGeneratorExpression(org.springframework.expression.Expression localFilenameGeneratorExpression)
public void setTemporaryFileSuffix(java.lang.String temporaryFileSuffix)
public void setRemoteDirectory(java.lang.String remoteDirectory)
public void setFilter(FileListFilter<F> filter)
public void setDeleteRemoteFiles(boolean deleteRemoteFiles)
public void setPreserveTimestamp(boolean preserveTimestamp)
public void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext)
setIntegrationEvaluationContext
in interface IntegrationEvaluationContextAware
public final void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
protected java.lang.String getTemporaryFileSuffix()
public void synchronizeToLocalDirectory(java.io.File localDirectory)
synchronizeToLocalDirectory
in interface InboundFileSynchronizer
protected abstract boolean isFile(F file)
protected abstract java.lang.String getFilename(F file)
protected abstract long getModified(F file)