public abstract class AbstractInboundFileSynchronizingMessageSource<F>
extends org.springframework.integration.endpoint.AbstractMessageSource<java.io.File>
The base class supports configuration of whether the remote file system and local file system's directories should be created on start (what 'creating a directory' means to the specific adapter is of course implementation specific).
This class is to be used as a pair with an implementation of
AbstractInboundFileSynchronizer
. The synchronizer must
handle the work of actually connecting to the remote file system and
delivering new File
s.
Constructor and Description |
---|
AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer) |
AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer,
java.util.Comparator<java.io.File> comparator) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
org.springframework.messaging.Message<java.io.File> |
doReceive()
Polls from the file source.
|
void |
setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory) |
void |
setLocalDirectory(java.io.File localDirectory) |
void |
setLocalFilter(FileListFilter<java.io.File> localFileListFilter)
A
FileListFilter used to determine which files will generate messages
after they have been synchronized. |
getComponentName, receive, setBeanName, setHeaderExpressions
evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService
public AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer)
public AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer, java.util.Comparator<java.io.File> comparator)
public void setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory)
public void setLocalDirectory(java.io.File localDirectory)
public void setLocalFilter(FileListFilter<java.io.File> localFileListFilter)
FileListFilter
used to determine which files will generate messages
after they have been synchronized. It will be combined with a filter that
will prevent accessing files that are in the process of being synchronized
(files having the AbstractInboundFileSynchronizer.getTemporaryFileSuffix()
).
The default is an AcceptOnceFileListFilter
which filters duplicate file
names (processed during the current execution).
localFileListFilter
- The local file list filter.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.integration.util.AbstractExpressionEvaluator
java.lang.Exception
public final org.springframework.messaging.Message<java.io.File> doReceive()
doReceive
in class org.springframework.integration.endpoint.AbstractMessageSource<java.io.File>