Class FileInboundChannelAdapterSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageSourceSpec<FileInboundChannelAdapterSpec,FileReadingMessageSource>
org.springframework.integration.file.dsl.FileInboundChannelAdapterSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<FileReadingMessageSource>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
public class FileInboundChannelAdapterSpec extends MessageSourceSpec<FileInboundChannelAdapterSpec,FileReadingMessageSource> implements ComponentsRegistration
- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Fields Modifier and Type Field Description protected FileListFilterFactoryBean
fileListFilterFactoryBean
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
FileInboundChannelAdapterSpec()
protected
FileInboundChannelAdapterSpec(Comparator<File> receptionOrderComparator)
-
Method Summary
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
Constructor Details
-
FileInboundChannelAdapterSpec
protected FileInboundChannelAdapterSpec() -
FileInboundChannelAdapterSpec
-
-
Method Details
-
scanner
Specify a custom scanner.- Parameters:
scanner
- the scanner.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setScanner(DirectoryScanner)
-
autoCreateDirectory
Specify whether to create the source directory automatically if it does not yet exist upon initialization. By default, this value is true. If set to false and the source directory does not exist, an Exception will be thrown upon initialization.- Parameters:
autoCreateDirectory
- the autoCreateDirectory.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setAutoCreateDirectory(boolean)
-
filter
Configure the filter.- Parameters:
filter
- the filter.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setFilter(FileListFilter)
-
filterExpression
Configure theExpressionFileListFilter
.- Parameters:
expression
- the SpEL expression for files filtering.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setFilter(FileListFilter)
,ExpressionFileListFilter
-
filterFunction
Configure theExpressionFileListFilter
.- Parameters:
filterFunction
- theFunction
for files filtering.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setFilter(FileListFilter)
,ExpressionFileListFilter
-
preventDuplicates
Configure anAcceptOnceFileListFilter
ifpreventDuplicates == true
, otherwise -AcceptAllFileListFilter
.- Parameters:
preventDuplicates
- true to configure anAcceptOnceFileListFilter
.- Returns:
- the spec.
-
ignoreHidden
Configure anIgnoreHiddenFileListFilter
ifignoreHidden == true
.- Parameters:
ignoreHidden
- true to configure anIgnoreHiddenFileListFilter
.- Returns:
- the spec.
-
patternFilter
Configure aSimplePatternFileListFilter
.- Parameters:
pattern
- The pattern.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setFilter(FileListFilter)
,filter(FileListFilter)
-
regexFilter
Configure aRegexPatternFileListFilter
.- Parameters:
regex
- The regex.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setFilter(FileListFilter)
,filter(FileListFilter)
-
locker
Set aFileLocker
to be used to guard files against duplicate processing.- Parameters:
locker
- the locker.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setLocker(FileLocker)
-
nioLocker
Configure anNioFileLocker
.- Returns:
- the spec.
- See Also:
locker(FileLocker)
-
scanEachPoll
Set this flag if you want to make sure the internal queue is refreshed with the latest content of the input directory on each poll.- Parameters:
scanEachPoll
- the scanEachPoll.- Returns:
- the spec.
- See Also:
FileReadingMessageSource.setScanEachPoll(boolean)
-
useWatchService
Switch thisFileReadingMessageSource
to use its internalWatchService
directory scanner.- Parameters:
useWatchService
- theboolean
flag to enable the use of aWatchService
.- Returns:
- the spec.
- See Also:
watchEvents(org.springframework.integration.file.FileReadingMessageSource.WatchEventType...)
,FileReadingMessageSource.setUseWatchService(boolean)
-
watchEvents
public FileInboundChannelAdapterSpec watchEvents(FileReadingMessageSource.WatchEventType... watchEvents)- Parameters:
watchEvents
- the set ofFileReadingMessageSource.WatchEventType
.- Returns:
- the spec.
- See Also:
useWatchService(boolean)
,FileReadingMessageSource.setWatchEvents(org.springframework.integration.file.FileReadingMessageSource.WatchEventType...)
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-