Added support (in the schema) for the <poller/> sub-element within a <channel-adapter/> and added a setSource(MessageSource) method to DirectChannel.

This commit is contained in:
Mark Fisher
2008-07-14 22:49:38 +00:00
parent 77022d0519
commit 8f1cf63f5e
2 changed files with 5 additions and 0 deletions

View File

@@ -180,6 +180,7 @@
<xsd:extension base="beans:identifiedType">
<xsd:all>
<xsd:element ref="schedule" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="poller" minOccurs="0" maxOccurs="1"/>
<xsd:element name="interceptors" type="interceptorsType" minOccurs="0" maxOccurs="1"/>
</xsd:all>
<xsd:attribute name="source" type="xsd:string"/>

View File

@@ -56,6 +56,10 @@ public class DirectChannel extends AbstractMessageChannel implements Subscribabl
}
public void setSource(MessageSource<?> source) {
this.source = source;
}
public boolean subscribe(MessageTarget target) {
boolean added = this.dispatcher.addTarget(target);
if (added) {