Search in sources :

Example 1 with InboundChannelAdapter

use of org.springframework.integration.annotation.InboundChannelAdapter in project tutorials by eugenp.

the class FileCopyConfig method fileReadingMessageSource.

@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;
}
Also used : File(java.io.File) FileReadingMessageSource(org.springframework.integration.file.FileReadingMessageSource) SimplePatternFileListFilter(org.springframework.integration.file.filters.SimplePatternFileListFilter) InboundChannelAdapter(org.springframework.integration.annotation.InboundChannelAdapter) Bean(org.springframework.context.annotation.Bean)

Aggregations

File (java.io.File)1 Bean (org.springframework.context.annotation.Bean)1 InboundChannelAdapter (org.springframework.integration.annotation.InboundChannelAdapter)1 FileReadingMessageSource (org.springframework.integration.file.FileReadingMessageSource)1 SimplePatternFileListFilter (org.springframework.integration.file.filters.SimplePatternFileListFilter)1