public abstract class AbstractInboundFileSynchronizingMessageSource<F> extends AbstractMessageSource<File> implements LifecycleMessageSource<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 Files.
logger| Constructor and Description |
|---|
AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer) |
AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer,
Comparator<File> comparator) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Message<File> |
doReceive()
Polls from the file source.
|
boolean |
isRunning() |
void |
setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory) |
void |
setLocalDirectory(File localDirectory) |
void |
setLocalFilter(FileListFilter<File> localFileListFilter)
A
FileListFilter used to determine which files will generate messages
after they have been synchronized. |
void |
start() |
void |
stop() |
getComponentName, receive, setBeanName, setHeaderExpressionsevaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreceivegetComponentTypepublic AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer)
public AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer, Comparator<File> comparator)
public void setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory)
public void setLocalDirectory(File localDirectory)
public void setLocalFilter(FileListFilter<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 Exception
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractExpressionEvaluatorExceptionpublic final Message<File> doReceive()
doReceive in class AbstractMessageSource<File>