INT-736 Added support for the 'scheduler' reference.

This commit is contained in:
Mark Fisher
2009-07-18 00:53:33 +00:00
parent 76da6421d3
commit 260690381c
4 changed files with 45 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ public class DelayerParser extends AbstractConsumerEndpointParser {
parserContext.getReaderContext().error("The 'default-delay' attribute is required.", element);
return null;
}
builder.getBeanDefinition().getConstructorArgumentValues().addIndexedArgumentValue(0, defaultDelay);
builder.addConstructorArgValue(defaultDelay);
String scheduler = element.getAttribute("scheduler");
if (StringUtils.hasText(scheduler)) {
builder.addConstructorArgReference(scheduler);

View File

@@ -597,6 +597,21 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="scheduler" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Provide a reference to the ScheduledExecutorService instance to which this endpoint should
delegate when scheduling the sending of delayed Messages. If not provided, the default
will use a thread pool of size 1.
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type
type="java.util.concurrent.ScheduledExecutorService" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="send-timeout" type="xsd:string">
<xsd:annotation>
<xsd:documentation>