public abstract class AbstractInboundFileSynchronizingMessageSource<F>
extends org.springframework.integration.endpoint.MessageProducerSupport
implements org.springframework.integration.core.MessageSource<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 Files.
| Constructor and Description |
|---|
AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer) |
AbstractInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<F> synchronizer,
java.util.Comparator<java.io.File> comparator) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onInit() |
org.springframework.integration.Message<java.io.File> |
receive()
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. |
doStart, doStop, sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrackgetPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stopafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, toStringpublic 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 - protected void onInit()
onInit in class org.springframework.integration.endpoint.MessageProducerSupportpublic final org.springframework.integration.Message<java.io.File> receive()
receive in interface org.springframework.integration.core.MessageSource<java.io.File>