You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/04/03 10:33:56 UTC
svn commit: r644222 -
/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
Author: ningjiang
Date: Thu Apr 3 01:33:55 2008
New Revision: 644222
URL: http://svn.apache.org/viewvc?rev=644222&view=rev
Log:
Added the snippte comments for the Multicast wiki page
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java?rev=644222&r1=644221&r2=644222&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java Thu Apr 3 01:33:55 2008
@@ -47,7 +47,7 @@
url = "direct:sequential";
}
- Exchange result = template.send(url, new Processor() {
+ Exchange exchange = template.send(url, new Processor() {
public void process(Exchange exchange) {
Message in = exchange.getIn();
in.setBody("input");
@@ -56,8 +56,8 @@
});
- assertNotNull("We should get result here", result);
- assertEquals("Can't get the right result", "inputx+inputy+inputz", result.getOut().getBody(String.class));
+ assertNotNull("We should get result here", exchange);
+ assertEquals("Can't get the right result", "inputx+inputy+inputz", exchange.getOut().getBody(String.class));
assertMockEndpointsSatisifed();
}
@@ -133,8 +133,10 @@
return new RouteBuilder() {
public void configure() {
+ // START SNIPPET: example
+ // The message will be parallely sent to the endpoints
from("direct:parallel").multicast(new BodyOutAggregatingStrategy(), true).to("direct:x", "direct:y", "direct:z");
-
+ // Mulitcast the message in a sequential way
from("direct:sequential").multicast(new BodyOutAggregatingStrategy()).to("direct:x", "direct:y", "direct:z");
from("direct:x").process(new AppendingProcessor("x")).to("direct:aggregater");
@@ -143,6 +145,7 @@
from("direct:aggregater").aggregator(header("cheese"), new BodyInAggregatingStrategy()).
completedPredicate(header("aggregated").isEqualTo(3)).to("mock:result");
+ // END SNIPPET: example
}
};