public abstract class AbstractInboundFileSynchronizingMessageSource<F> extends MessageProducerSupport implements MessageSource<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 |
|---|---|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
Message<File> |
receive()
Polls from the file source.
|
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. |
doStart, doStop, sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrackgetPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stopafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentName, getComponentTypepublic 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.protected void onInit()
IntegrationObjectSupportonInit in class MessageProducerSupportpublic final Message<File> receive()
receive in interface MessageSource<File>