public abstract class AbstractInboundFileSynchronizingMessageSource<F> extends MessageProducerSupport implements 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 File
s.
logger
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()
Subclasses may implement this for initialization logic.
|
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, setShouldTrack
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName, getComponentType
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
- protected void onInit()
IntegrationObjectSupport
onInit
in class MessageProducerSupport
public final Message<java.io.File> receive()
receive
in interface MessageSource<java.io.File>