Removed the name parameter from channelRegistry.registerChannel() since the MessageChannel interface already defines getName(). Removed the setName() method from the MessageChannel interface. Removed the 'error-channel' attribute from the <message-bus/> element and the setErrorChannel() method from MessageBus. The "errorChannel" name is now sufficient for configuration.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<bean id="messageChannel"
|
||||
class="org.springframework.integration.channel.QueueChannel" />
|
||||
|
||||
<si:message-bus error-channel="errors" />
|
||||
<si:message-bus/>
|
||||
|
||||
<si:channel id="inputOne" />
|
||||
<si:channel id="inputTwo" />
|
||||
@@ -19,7 +19,7 @@
|
||||
<si:channel id="outputOne" />
|
||||
<si:channel id="outputTwo" />
|
||||
|
||||
<si:channel id="errors" />
|
||||
<si:channel id="errorChannel" />
|
||||
|
||||
<si-xml:xpath-router id="routerOne"
|
||||
xpath-expression-ref="xpathExpression" />
|
||||
|
||||
@@ -48,8 +48,8 @@ public class XPathRouterParserTests extends AbstractJUnit4SpringContextTests{
|
||||
@Autowired @Qualifier("outputTwo")
|
||||
PollableChannel outputTwo;
|
||||
|
||||
@Autowired @Qualifier("errors")
|
||||
PollableChannel errors;
|
||||
@Autowired @Qualifier("errorChannel")
|
||||
PollableChannel errorChannel;
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -78,7 +78,7 @@ public class XPathRouterParserTests extends AbstractJUnit4SpringContextTests{
|
||||
Document doc = XmlTestUtil.getDocumentForString("<name>outputThree</name>");
|
||||
GenericMessage<Document> docMessage = new GenericMessage<Document>(doc);
|
||||
inputOne.send(docMessage);
|
||||
GenericMessage<Document> received = (GenericMessage<Document>) errors.receive(1000);
|
||||
GenericMessage<Document> received = (GenericMessage<Document>) errorChannel.receive(1000);
|
||||
assertNotNull("Did not recevie message on errors", received);
|
||||
|
||||
}
|
||||
@@ -109,7 +109,7 @@ public class XPathRouterParserTests extends AbstractJUnit4SpringContextTests{
|
||||
Document doc = XmlTestUtil.getDocumentForString("<name>outputThree</name>");
|
||||
GenericMessage<Document> docMessage = new GenericMessage<Document>(doc);
|
||||
inputTwo.send(docMessage);
|
||||
GenericMessage<Document> received = (GenericMessage<Document>) errors.receive(1000);
|
||||
GenericMessage<Document> received = (GenericMessage<Document>) errorChannel.receive(1000);
|
||||
assertNotNull("Did not recevie message on errors", received);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user