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

The following examples show how to use org.springframework.integration.file.filters.SimplePatternFileListFilter. 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 File: DemoApplication.java    From activiti-examples with 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 File: FolderListener.java    From spring-batch-lightmin with 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 File: TxIntegrationConfig.java    From tutorials with 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 File: FileCopyConfig.java    From tutorials with 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;
}