public class FileInboundChannelAdapterSpec extends MessageSourceSpec<FileInboundChannelAdapterSpec,FileReadingMessageSource> implements ComponentsRegistration
Modifier and Type | Field and Description |
---|---|
protected FileListFilterFactoryBean |
fileListFilterFactoryBean |
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
FileInboundChannelAdapterSpec() |
protected |
FileInboundChannelAdapterSpec(Comparator<File> receptionOrderComparator) |
messageHeaders
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
protected final FileListFilterFactoryBean fileListFilterFactoryBean
protected FileInboundChannelAdapterSpec()
protected FileInboundChannelAdapterSpec(Comparator<File> receptionOrderComparator)
public FileInboundChannelAdapterSpec scanner(DirectoryScanner scanner)
scanner
- the scanner.FileReadingMessageSource.setScanner(DirectoryScanner)
public FileInboundChannelAdapterSpec autoCreateDirectory(boolean autoCreateDirectory)
autoCreateDirectory
- the autoCreateDirectory.FileReadingMessageSource.setAutoCreateDirectory(boolean)
public FileInboundChannelAdapterSpec filter(FileListFilter<File> filter)
filter
- the filter.FileReadingMessageSource.setFilter(FileListFilter)
public FileInboundChannelAdapterSpec filterExpression(String expression)
ExpressionFileListFilter
.expression
- the SpEL expression for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public FileInboundChannelAdapterSpec filterFunction(java.util.function.Function<File,Boolean> filterFunction)
ExpressionFileListFilter
.filterFunction
- the Function
for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public FileInboundChannelAdapterSpec preventDuplicates(boolean preventDuplicates)
AcceptOnceFileListFilter
if
preventDuplicates == true
, otherwise -
AcceptAllFileListFilter
.preventDuplicates
- true to configure an
AcceptOnceFileListFilter
.public FileInboundChannelAdapterSpec ignoreHidden(boolean ignoreHidden)
IgnoreHiddenFileListFilter
if
ignoreHidden == true
.ignoreHidden
- true to configure an
IgnoreHiddenFileListFilter
.public FileInboundChannelAdapterSpec patternFilter(String pattern)
SimplePatternFileListFilter
.pattern
- The pattern.FileReadingMessageSource.setFilter(FileListFilter)
,
filter(FileListFilter)
public FileInboundChannelAdapterSpec regexFilter(String regex)
RegexPatternFileListFilter
.regex
- The regex.FileReadingMessageSource.setFilter(FileListFilter)
,
filter(FileListFilter)
public FileInboundChannelAdapterSpec locker(FileLocker locker)
FileLocker
to be used to guard files against
duplicate processing.locker
- the locker.FileReadingMessageSource.setLocker(FileLocker)
public FileInboundChannelAdapterSpec nioLocker()
NioFileLocker
.locker(FileLocker)
public FileInboundChannelAdapterSpec scanEachPoll(boolean scanEachPoll)
scanEachPoll
- the scanEachPoll.FileReadingMessageSource.setScanEachPoll(boolean)
public FileInboundChannelAdapterSpec useWatchService(boolean useWatchService)
FileReadingMessageSource
to use its internal
WatchService
directory scanner.useWatchService
- the boolean
flag to enable the use
of a WatchService
.watchEvents(org.springframework.integration.file.FileReadingMessageSource.WatchEventType...)
,
FileReadingMessageSource.setUseWatchService(boolean)
public FileInboundChannelAdapterSpec watchEvents(FileReadingMessageSource.WatchEventType... watchEvents)
watchEvents
- the set of FileReadingMessageSource.WatchEventType
.useWatchService(boolean)
,
FileReadingMessageSource.setWatchEvents(org.springframework.integration.file.FileReadingMessageSource.WatchEventType...)
public Map<Object,String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration