The <poller/> element now accepts the "initial-delay" and "fixed-rate" (boolean) attributes (INT-326).
This commit is contained in:
@@ -148,6 +148,16 @@ public abstract class IntegrationNamespaceUtils {
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(PollingDispatcher.class);
|
||||
Long period = Long.valueOf(element.getAttribute("period"));
|
||||
PollingSchedule schedule = new PollingSchedule(period);
|
||||
String initialDelay = element.getAttribute("initial-delay");
|
||||
if (StringUtils.hasText(initialDelay)) {
|
||||
schedule.setInitialDelay(Long.valueOf(initialDelay));
|
||||
}
|
||||
if ("true".equals(element.getAttribute("fixed-rate").toLowerCase())) {
|
||||
schedule.setFixedRate(true);
|
||||
}
|
||||
else {
|
||||
schedule.setFixedRate(false);
|
||||
}
|
||||
String templateBeanName = parseMessageExhangeTemplate(element, parserContext);
|
||||
builder.addConstructorArgReference(sourceBeanName);
|
||||
builder.addConstructorArgValue(schedule);
|
||||
|
||||
@@ -229,6 +229,8 @@
|
||||
<xsd:element name="transactional" type="transactionalType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="period" type="xsd:long" use="required"/>
|
||||
<xsd:attribute name="initial-delay" type="xsd:long"/>
|
||||
<xsd:attribute name="fixed-rate" type="xsd:boolean"/>
|
||||
<xsd:attribute name="receive-timeout" type="xsd:long"/>
|
||||
<xsd:attribute name="send-timeout" type="xsd:long"/>
|
||||
<xsd:attribute name="max-messages-per-poll" type="xsd:long"/>
|
||||
|
||||
Reference in New Issue
Block a user