activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r521456 - /activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/builder/spring_route_builder_test.xml
Date Thu, 22 Mar 2007 20:54:37 GMT
Author: chirino
Date: Thu Mar 22 13:54:37 2007
New Revision: 521456

URL: http://svn.apache.org/viewvc?view=rev&rev=521456
Log:
Added snipplet markers and rearanged. 

Modified:
    activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/builder/spring_route_builder_test.xml

Modified: activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/builder/spring_route_builder_test.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/builder/spring_route_builder_test.xml?view=diff&rev=521456&r1=521455&r2=521456
==============================================================================
--- activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/builder/spring_route_builder_test.xml
(original)
+++ activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/builder/spring_route_builder_test.xml
Thu Mar 22 13:54:37 2007
@@ -25,66 +25,41 @@
     <!-- 
         from("queue:a").to("queue:b");
      -->
+    <!-- START SNIPPET: e1 -->
     <routeBuilder id="buildSimpleRoute" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
          <to uri="queue:b"/>
        </route>
     </routeBuilder>
+    <!-- END SNIPPET: e1 -->
     
     <!-- 
-        from("queue:a").process(myProcessor);
-     -->
-    <bean id="myProcessor" class="org.apache.camel.builder.MyProcessor"/>
-    <routeBuilder id="buildCustomProcessor" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
-       <route>
-         <from uri="queue:a"/>
-         <process ref="#myProcessor"/>
-       </route>
-    </routeBuilder>
-
-    <!-- 
-        from("queue:a").filter(header("foo").isEqualTo("bar")).process(myProcessor);
+        from("queue:a").filter(header("foo").isEqualTo("bar")).to("queue:b");
      -->
-    <routeBuilder id="buildCustomProcessorWithFilter" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+    <!-- START SNIPPET: e2 -->
+    <routeBuilder id="buildSimpleRouteWithHeaderPredicate" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
          <filter>
-           <predicate>
-             <header name="foo"/>
-             <isEqualTo value="bar"/>
-           </predicate>
+             <predicate>
+                <header name="foo"/>
+                <isEqualTo value="bar"/>
+             </predicate>
          </filter>
-         <process ref="#myProcessor"/>
-       </route>
-    </routeBuilder>
-
-    <!-- 
-        from("queue:a")
-           .intercept()
-              .add(interceptor1)
-              .add(interceptor2)
-           .target().to("queue:d");
-     -->
-    <bean id="interceptor1" class="org.apache.camel.builder.MyInterceptorProcessor"/>
-    <bean id="interceptor2" class="org.apache.camel.builder.MyInterceptorProcessor"/>
    
-    <routeBuilder id="buildRouteWithInterceptor" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
-       <route>
-         <from uri="queue:a"/>
-         <intercept>
-             <interceptor ref="#interceptor1"/>
-             <interceptor ref="#interceptor2"/>
-         </intercept>
-         <to uri="queue:d"/>
+         <to uri="queue:b"/>
        </route>
     </routeBuilder>
-
-    <!-- 
+    <!-- END SNIPPET: e2 -->
+    
+    
+        <!-- 
         from("queue:a").choice()
                 .when(header("foo").isEqualTo("bar")).to("queue:b")
                 .when(header("foo").isEqualTo("cheese")).to("queue:c")
                 .otherwise().to("queue:d");
      -->
+    <!-- START SNIPPET: e3 -->
     <routeBuilder id="buildSimpleRouteWithChoice" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
@@ -109,26 +84,45 @@
          </choice>
        </route>
     </routeBuilder>
+    <!-- END SNIPPET: e3 -->
 
+    
     <!-- 
-        from("queue:a").filter(header("foo").isEqualTo("bar")).to("queue:b");
+        from("queue:a").process(myProcessor);
      -->
-    <routeBuilder id="buildSimpleRouteWithHeaderPredicate" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+    <!-- START SNIPPET: e4 -->
+    <bean id="myProcessor" class="org.apache.camel.builder.MyProcessor"/>
+    <routeBuilder id="buildCustomProcessor" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+       <route>
+         <from uri="queue:a"/>
+         <process ref="#myProcessor"/>
+       </route>
+    </routeBuilder>
+    <!-- END SNIPPET: e4 -->
+
+    <!-- 
+        from("queue:a").filter(header("foo").isEqualTo("bar")).process(myProcessor);
+     -->
+    <!-- START SNIPPET: e5 -->
+    <routeBuilder id="buildCustomProcessorWithFilter" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
          <filter>
-             <predicate>
-                <header name="foo"/>
-                <isEqualTo value="bar"/>
-             </predicate>
+           <predicate>
+             <header name="foo"/>
+             <isEqualTo value="bar"/>
+           </predicate>
          </filter>
-         <to uri="queue:b"/>
+         <process ref="#myProcessor"/>
        </route>
     </routeBuilder>
+    <!-- END SNIPPET: e5 -->
+
 
     <!-- 
         from("queue:a").to("queue:tap", "queue:b");
      -->
+    <!-- START SNIPPET: e6-->
     <routeBuilder id="buildWireTap" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
@@ -138,25 +132,35 @@
          </to>
        </route>
     </routeBuilder>
+    <!-- END SNIPPET: e6 -->
     
+
     <!-- 
-        from("queue:a").recipientList(header("foo"));
+        from("queue:a")
+           .intercept()
+              .add(interceptor1)
+              .add(interceptor2)
+           .target().to("queue:d");
      -->
-    <routeBuilder id="buildDynamicRecipientList" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+    <!-- START SNIPPET: e7 -->
+    <bean id="interceptor1" class="org.apache.camel.builder.MyInterceptorProcessor"/>
+    <bean id="interceptor2" class="org.apache.camel.builder.MyInterceptorProcessor"/>
    
+    <routeBuilder id="buildRouteWithInterceptor" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
-         <recipientList>
-         	<recipients>
-              <header name="foo"/>
-            </recipients>
-         </recipientList>
+         <intercept>
+             <interceptor ref="#interceptor1"/>
+             <interceptor ref="#interceptor2"/>
+         </intercept>
+         <to uri="queue:d"/>
        </route>
     </routeBuilder>
-    
-                    
+    <!-- END SNIPPET: e7 -->
+
     <!-- 
         from("queue:a").to("queue:b", "queue:c", "queue:d");
      -->
+    <!-- START SNIPPET: e8 -->
     <routeBuilder id="buildStaticRecipientList" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
@@ -167,12 +171,29 @@
          </to>
        </route>
     </routeBuilder>
-                    
+    <!-- END SNIPPET: e8 -->
     
+
+    <!-- 
+        from("queue:a").recipientList(header("foo"));
+     -->
+    <!-- START SNIPPET: e9 -->
+    <routeBuilder id="buildDynamicRecipientList" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+       <route>
+         <from uri="queue:a"/>
+         <recipientList>
+         	<recipients>
+              <header name="foo"/>
+            </recipients>
+         </recipientList>
+       </route>
+    </routeBuilder>
+    <!-- END SNIPPET: e9 -->
                     
     <!-- 
         from("queue:a").splitter(bodyAs(String.class).tokenize("\n")).to("queue:b");
      -->
+    <!-- START SNIPPET: splitter -->
     <routeBuilder id="buildSplitter" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd">
        <route>
          <from uri="queue:a"/>
@@ -186,6 +207,7 @@
          <to uri="queue:b"/>
        </route>
     </routeBuilder>
+    <!-- END SNIPPET: splitter -->
 
 </beans>
 <!-- END SNIPPET: example -->



Mime
View raw message