Expose scan-each-poll for File Inbound Ch Adapter

The `scan-each-poll` XML attribute is missing for the
`<int-file:inbound-channel-adapter>`
This commit is contained in:
Artem Bilan
2018-01-26 11:21:51 -05:00
committed by Gary Russell
parent 2fbb6fbaf4
commit 3fa777db5e
5 changed files with 19 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,6 +52,7 @@ public class FileInboundChannelAdapterParser extends AbstractPollingInboundChann
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "directory");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "auto-create-directory");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "queue-size");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "scan-each-poll");
String filterBeanName = this.registerFilter(element, parserContext);
String lockerBeanName = registerLocker(element, parserContext);
if (filterBeanName != null) {

View File

@@ -70,7 +70,6 @@ public class FileReadingMessageSourceFactoryBean implements FactoryBean<FileRead
private final Object initializationMonitor = new Object();
public void setDirectory(File directory) {
this.directory = directory;
}

View File

@@ -182,6 +182,17 @@ Only files matching this regular expression will be picked up by this adapter.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="scan-each-poll" default="false">
<xsd:annotation>
<xsd:documentation>
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.
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string"/>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>