camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r768976 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/model/ camel-core/src/test/java/org/apache/camel/processor/ components/camel-spring/src/test/resources/org/apache/camel/spring/processor/
Date Mon, 27 Apr 2009 13:39:47 GMT
Author: davsclaus
Date: Mon Apr 27 13:39:47 2009
New Revision: 768976

URL: http://svn.apache.org/viewvc?rev=768976&view=rev
Log:
CAMEL-1558: Added interceptEndpoint to intercept when an exchange is being sent to the given
endpoint.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateWithStopTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorTest.xml

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java?rev=768976&r1=768975&r2=768976&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Mon
Apr 27 13:39:47 2009
@@ -48,8 +48,8 @@
 import org.apache.camel.model.language.ExpressionDefinition;
 import org.apache.camel.model.language.LanguageExpression;
 import org.apache.camel.processor.DefaultChannel;
-import org.apache.camel.processor.Pipeline;
 import org.apache.camel.processor.InterceptEndpointProcessor;
+import org.apache.camel.processor.Pipeline;
 import org.apache.camel.processor.aggregate.AggregationCollection;
 import org.apache.camel.processor.aggregate.AggregationStrategy;
 import org.apache.camel.spi.DataFormat;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateTest.java?rev=768976&r1=768975&r2=768976&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateTest.java
Mon Apr 27 13:39:47 2009
@@ -17,8 +17,8 @@
 package org.apache.camel.processor;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Processor;
 import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 
 /**

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateWithStopTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateWithStopTest.java?rev=768976&r1=768975&r2=768976&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateWithStopTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateWithStopTest.java
Mon Apr 27 13:39:47 2009
@@ -17,8 +17,6 @@
 package org.apache.camel.processor;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 
 /**
@@ -52,10 +50,4 @@
         };
     }
 
-    private class MyTestServiceProcessor implements Processor {
-
-        public void process(Exchange exchange) throws Exception {
-            exchange.getIn().setBody("This is a test body");
-        }
-    }
 }
\ No newline at end of file

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorTest.xml?rev=768976&r1=768975&r2=768976&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorTest.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorTest.xml
Mon Apr 27 13:39:47 2009
@@ -22,15 +22,20 @@
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
 
-  <!-- START SNIPPET: example -->
-  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-    <intercept>
-      <to uri="mock:middle1"/>
-    </intercept>
-    <route>
-      <from uri="direct:start"/>
-      <to uri="mock:end"/>
-    </route>
-  </camelContext>
-  <!-- END SNIPPET: example -->
+    <!-- START SNIPPET: example -->
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <!-- intercept incoming messages and route them to the mock:middle1 endpoint
+             before we proceed and continue routing from the point of interceptions, that
+             is mock:end will be the next target -->
+        <intercept>
+            <to uri="mock:middle1"/>
+        </intercept>
+
+        <!-- here we have a very simple route -->
+        <route>
+            <from uri="direct:start"/>
+            <to uri="mock:end"/>
+        </route>
+    </camelContext>
+    <!-- END SNIPPET: example -->
 </beans>



Mime
View raw message