Java Code Examples for org.springframework.integration.file.filters.SimplePatternFileListFilter

The following examples show how to use org.springframework.integration.file.filters.SimplePatternFileListFilter. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: activiti-examples   Source File: DemoApplication.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
@InboundChannelAdapter(value = "fileChannel", poller = @Poller(fixedDelay = "1000"))
public MessageSource<File> fileReadingMessageSource() {
    FileReadingMessageSource sourceReader = new FileReadingMessageSource();
    sourceReader.setDirectory(new File(INPUT_DIR));
    sourceReader.setFilter(new SimplePatternFileListFilter(FILE_PATTERN));
    return sourceReader;
}
 
Example 2
Source Project: spring-batch-lightmin   Source File: FolderListener.java    License: Apache License 2.0 5 votes vote down vote up
private void initFileListFilter() throws Exception {
    this.fileFileListFilter = new CompositeFileListFilter<>();
    this.fileFileListFilter.addFilter(new AcceptOnceFileListFilter<>());
    this.fileFileListFilter.addFilter(new IgnoreHiddenFileListFilter());

    this.fileFileListFilter.addFilter(new SimplePatternFileListFilter(this.jobListenerConfiguration.getFilePattern()));
}
 
Example 3
Source Project: tutorials   Source File: TxIntegrationConfig.java    License: MIT License 5 votes vote down vote up
@Bean
@InboundChannelAdapter(value = "inputChannel", poller = @Poller(value = "pollerMetadata"))
public MessageSource<File> fileReadingMessageSource() {
    FileReadingMessageSource sourceReader = new FileReadingMessageSource();
    sourceReader.setDirectory(new File(INPUT_DIR));
    sourceReader.setFilter(new SimplePatternFileListFilter(FILE_PATTERN));
    return sourceReader;
}
 
Example 4
Source Project: tutorials   Source File: FileCopyConfig.java    License: MIT License 5 votes vote down vote up
@Bean
@InboundChannelAdapter(value = "fileChannel", poller = @Poller(fixedDelay = "10000"))
public MessageSource<File> fileReadingMessageSource() {
    FileReadingMessageSource sourceReader = new FileReadingMessageSource();
    sourceReader.setDirectory(new File(INPUT_DIR));
    sourceReader.setFilter(new SimplePatternFileListFilter(FILE_PATTERN));
    return sourceReader;
}