camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r770754 [1/2] - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/spi/ camel-core/s...
Date Fri, 01 May 2009 17:02:33 GMT
Author: davsclaus
Date: Fri May  1 17:02:31 2009
New Revision: 770754

URL: http://svn.apache.org/viewvc?rev=770754&view=rev
Log:
CAMEL-1578: Renamed intercept() to interceptFrom() as it is what it does. New syntax sugar is planned for a InterceptStrategy that leverages the Channel to allow intercepting every processing step.

Added:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromLogTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorLogTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromPredicateProceedAndStopTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorPredicateProceedAndStopTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/IntercepFromWithPredicateTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IntercepWithPredicateTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTestSupport.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTestSupport.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleLogTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleLogTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateWithStopTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateWithStopTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleRouteTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenNoStopTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenWithChoiceTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndProceedRouteTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndProceedRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndStopRouteTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndStopRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateRouteTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithStopRouteTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithStopRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithoutProceedRouteTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithoutProceedRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToEndpointTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptSendToEndpointTest.java
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptFromDefinition.scala
      - copied, changed from r770746, camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptDefinition.scala
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptFromTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptorTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptFromWhenNoStopTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptWhenNoStopTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptFromWhenTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptWhenTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptFromWhenWithChoiceTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptWhenWithChoiceTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptFromWithStopTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptorWithStopTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSendToEndpointSkipTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptEndpointSkipTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSendToEndpointTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptEndpointTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSendToEndpointWhenTest.java   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptEndpointWhenTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptFromTest.xml   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptFromWhenNoStopTest.xml   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptWhenNoStopTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptFromWhenTest.xml   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptWhenTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptFromWhenWithChoiceTest.xml   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptWhenWithChoiceTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptFromWithStopTest.xml   (contents, props changed)
      - copied, changed from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorWithStopTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptSendToEendpointWhen.xml   (props changed)
      - copied unchanged from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpointwhen.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptSendToEndpoint.xml   (props changed)
      - copied unchanged from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpoint.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptSendToEndpointSkip.xml   (props changed)
      - copied unchanged from r770656, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpointskip.xml
Removed:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorLogTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorPredicateProceedAndStopTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IntercepWithPredicateTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTestSupport.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptSendToEndpointTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenNoStopTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenWithChoiceTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndProceedRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndStopRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithStopRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithoutProceedRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleLogTest.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/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleRouteTest.java
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptDefinition.scala
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptEndpointSkipTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptEndpointTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptEndpointWhenTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptWhenNoStopTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptWhenTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptWhenWithChoiceTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptorTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptorWithStopTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptWhenNoStopTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptWhenTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptWhenWithChoiceTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptorWithStopTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpoint.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpointskip.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/interceptendpointwhen.xml
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java
    camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
    camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
    camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptorTest.scala
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java Fri May  1 17:02:31 2009
@@ -27,7 +27,7 @@
 import org.apache.camel.Routes;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.model.ChoiceDefinition;
-import org.apache.camel.model.InterceptDefinition;
+import org.apache.camel.model.InterceptFromDefinition;
 import org.apache.camel.model.InterceptSendToEndpointDefinition;
 import org.apache.camel.model.OnExceptionDefinition;
 import org.apache.camel.model.RouteDefinition;
@@ -148,23 +148,24 @@
     /**
      * Adds a route for an interceptor; use the {@link org.apache.camel.model.ProcessorDefinition#proceed()} method
      * to continue processing the underlying route being intercepted.
+     *
      * @return the builder
      */
-    public InterceptDefinition intercept() {
+    public InterceptFromDefinition interceptFrom() {
         routeCollection.setCamelContext(getContext());
-        return routeCollection.intercept();
+        return routeCollection.interceptFrom();
     }
 
     /**
-     * Applies a route for an interceptor if the given predicate is true
-     * otherwise the interceptor route is not applied
+     * Adds a route for an interceptor; use the {@link org.apache.camel.model.ProcessorDefinition#proceed()} method
+     * to continue processing the underlying route being intercepted.
      *
-     * @param predicate  the predicate
+     * @param uri  endpoint uri
      * @return the builder
      */
-    public ChoiceDefinition intercept(Predicate predicate) {
+    public InterceptFromDefinition interceptFrom(String uri) {
         routeCollection.setCamelContext(getContext());
-        return routeCollection.intercept(predicate);
+        return routeCollection.interceptFrom(uri);
     }
 
     /**

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java Fri May  1 17:02:31 2009
@@ -153,18 +153,6 @@
         eventDrivenProcessors.add(processor);
     }
 
-    public void intercept(Intercept interceptor) {
-        lastInterceptor = (Interceptor)interceptor;
-    }
-
-    public Processor createProceedProcessor() {
-        if (lastInterceptor == null) {
-            throw new IllegalArgumentException("Cannot proceed() from outside of an interceptor!");
-        } else {
-            return new ProceedProcessor(lastInterceptor);
-        }
-    }
-
     public List<InterceptStrategy> getInterceptStrategies() {
         return interceptStrategies;
     }

Copied: camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java (from r770656, camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java?p2=camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java&p1=camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java Fri May  1 17:02:31 2009
@@ -22,23 +22,31 @@
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlAttribute;
 
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.PredicateBuilder;
-import org.apache.camel.processor.Interceptor;
 import org.apache.camel.spi.RouteContext;
 
-
 /**
- * Represents an XML &lt;intercept/&gt; element
+ * Represents an XML &lt;interceptFrom/&gt; element
  *
  * @version $Revision$
  */
-@XmlRootElement(name = "intercept")
+@XmlRootElement(name = "interceptFrom")
 @XmlAccessorType(XmlAccessType.FIELD)
-public class InterceptDefinition extends OutputDefinition<ProcessorDefinition> {
-  
+public class InterceptFromDefinition extends OutputDefinition<ProcessorDefinition> {
+
+    // TODO: we need a new interceptDefinition to uses the InterceptStrategy so its applied for each route step
+    // and a more intelligent Channel so we can stop or proceed on-the-fly
+
+    // TODO: Filter by from endpoint uri
+    // TODO: Support lookup endpoint by ref (requires a bit more work)
+    // TODO: Support wildcards for endpoints so you can match by scheme, eg jms:*
+
+    @XmlAttribute(required = false)
+    private String uri;
     @XmlTransient
     protected ProceedDefinition proceed = new ProceedDefinition();
     @XmlTransient
@@ -46,30 +54,31 @@
     @XmlTransient
     protected Boolean usePredicate = Boolean.FALSE;
 
+    public InterceptFromDefinition() {
+    }
+
+    public InterceptFromDefinition(String uri) {
+        this.uri = uri;
+    }
+
     @Override
     public String toString() {
-        return "Intercept[" + getOutputs() + "]";
+        return "InterceptFrom[" + getOutputs() + "]";
     }
 
     @Override
     public String getShortName() {
-        return "intercept";
+        return "interceptFrom";
     }
 
     @Override
     public String getLabel() {
-        return "intercept";
+        return "interceptFrom";
     }
 
     @Override
     public Processor createProcessor(RouteContext routeContext) throws Exception {
-        Interceptor interceptor = new Interceptor();
-        routeContext.intercept(interceptor);
-
-        final Processor interceptRoute = createOutputsProcessor(routeContext);
-        interceptor.setInterceptorLogic(interceptRoute);
-
-        return interceptor;
+        return createOutputsProcessor(routeContext);
     }
 
     /**
@@ -138,8 +147,10 @@
         }
     }
 
-    public InterceptDefinition createProxy() {
-        InterceptDefinition answer = new InterceptDefinition();
+    // TODO: reduce complexity of this code
+
+    public InterceptFromDefinition createProxy() {
+        InterceptFromDefinition answer = new InterceptFromDefinition();
         answer.getOutputs().addAll(this.getOutputs());
         
         answer.setStopIntercept(getStopIntercept());
@@ -173,7 +184,7 @@
                     if (getStopIntercept()) {
                         // must add proceed to when clause if stop is explictiy declared, otherwise when the
                         // predicate test fails then there is no proceed
-                        // See example: InterceptorSimpleRouteTest (City Paris is never proceeded)  
+                        // See example: InterceptFromSimpleRouteTest (City Paris is never proceeded)
                         addProceedProxy(this.getProceed(), answer.getProceed(),
                             choice.getWhenClauses().get(choice.getWhenClauses().size() - 1), usePredicate);
                     }
@@ -211,4 +222,11 @@
         return stopIntercept;
     }
 
+    public String getUri() {
+        return uri;
+    }
+
+    public void setUri(String uri) {
+        this.uri = uri;
+    }
 }

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

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=770754&r1=770753&r2=770754&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 Fri May  1 17:02:31 2009
@@ -1296,17 +1296,6 @@
     }
 
     /**
-     * Intercepts outputs added to this node in the future (i.e. intercepts outputs added after this statement)
-     *
-     * @return the intercept builder to configure
-     */
-    public InterceptDefinition intercept() {
-        InterceptDefinition answer = new InterceptDefinition();
-        addOutput(answer);
-        return answer;
-    }
-
-    /**
      * Pushes the given block on the stack as current block
      * @param block  the block
      */
@@ -1337,14 +1326,14 @@
         ProceedDefinition proceed = null;
         ProcessorDefinition currentProcessor = this;
 
-        if (currentProcessor instanceof InterceptDefinition) {
-            proceed = ((InterceptDefinition) currentProcessor).getProceed();
+        if (currentProcessor instanceof InterceptFromDefinition) {
+            proceed = ((InterceptFromDefinition) currentProcessor).getProceed();
             LOG.info("proceed() is the implied and hence not needed for an intercept()");
         }
         if (proceed == null) {
             for (ProcessorDefinition node = parent; node != null; node = node.getParent()) {
-                if (node instanceof InterceptDefinition) {
-                    InterceptDefinition intercept = (InterceptDefinition)node;
+                if (node instanceof InterceptFromDefinition) {
+                    InterceptFromDefinition intercept = (InterceptFromDefinition)node;
                     proceed = intercept.getProceed();
                     break;
                 }
@@ -1373,13 +1362,13 @@
     public Type stop() {
         ProcessorDefinition currentProcessor = this;
 
-        if (currentProcessor instanceof InterceptDefinition) {
-            ((InterceptDefinition) currentProcessor).stopIntercept();
+        if (currentProcessor instanceof InterceptFromDefinition) {
+            ((InterceptFromDefinition) currentProcessor).stopIntercept();
         } else {
             ProcessorDefinition node;
             for (node = parent; node != null; node = node.getParent()) {
-                if (node instanceof InterceptDefinition) {
-                    ((InterceptDefinition) node).stopIntercept();
+                if (node instanceof InterceptFromDefinition) {
+                    ((InterceptFromDefinition) node).stopIntercept();
                     break;
                 }
             }
@@ -1433,31 +1422,6 @@
     }
 
     /**
-     * Apply an interceptor route if the predicate is true.
-     *
-     * @param predicate the predicate to test
-     * @return  the choice builder to configure
-     */
-    public ChoiceDefinition intercept(Predicate predicate) {
-        InterceptDefinition answer = new InterceptDefinition();
-        addOutput(answer);
-        return answer.when(predicate);
-    }
-
-    /**
-     * Creates a policy.
-     * <p/>
-     * Policy can be used for transactional policies.
-     *
-     * @return the policy builder to configure
-     */
-    public PolicyDefinition policies() {
-        PolicyDefinition answer = new PolicyDefinition();
-        addOutput(answer);
-        return answer;
-    }
-
-    /**
      * Apply a {@link Policy}.
      * <p/>
      * Policy can be used for transactional policies.

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java Fri May  1 17:02:31 2009
@@ -27,7 +27,6 @@
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
-import org.apache.camel.Predicate;
 import org.apache.camel.builder.ErrorHandlerBuilder;
 
 /**
@@ -41,7 +40,7 @@
     @XmlElementRef
     private List<RouteDefinition> routes = new ArrayList<RouteDefinition>();
     @XmlTransient
-    private List<InterceptDefinition> intercepts = new ArrayList<InterceptDefinition>();
+    private List<InterceptFromDefinition> interceptFroms = new ArrayList<InterceptFromDefinition>();
     @XmlTransient
     private List<InterceptSendToEndpointDefinition> interceptSendTos = new ArrayList<InterceptSendToEndpointDefinition>();
     @XmlTransient
@@ -71,12 +70,12 @@
         this.routes = routes;
     }
 
-    public List<InterceptDefinition> getIntercepts() {
-        return intercepts;
+    public List<InterceptFromDefinition> getInterceptFroms() {
+        return interceptFroms;
     }
 
-    public void setIntercepts(List<InterceptDefinition> intercepts) {
-        this.intercepts = intercepts;
+    public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms) {
+        this.interceptFroms = interceptFroms;
     }
 
     public List<InterceptSendToEndpointDefinition> getInterceptSendTos() {
@@ -182,19 +181,17 @@
         // lets configure the route
         route.setCamelContext(getCamelContext());
 
-        List<InterceptDefinition> intercepts = getIntercepts();
-        for (InterceptDefinition intercept : intercepts) {
+        List<InterceptFromDefinition> intercepts = getInterceptFroms();
+        for (InterceptFromDefinition intercept : intercepts) {
             // need to create a proxy for this one and use the
             // proceed of the proxy which will be local to this route
-            InterceptDefinition proxy = intercept.createProxy();
+            InterceptFromDefinition proxy = intercept.createProxy();
             route.addOutput(proxy);
             route.pushBlock(proxy.getProceed());
         }
 
         List<InterceptSendToEndpointDefinition> sendTos = getInterceptSendTos();
-        for (InterceptSendToEndpointDefinition intercept : sendTos) {
-            // special intercept for intercepting sending to an endpoint
-            InterceptSendToEndpointDefinition sendTo = (InterceptSendToEndpointDefinition) intercept;
+        for (InterceptSendToEndpointDefinition sendTo : sendTos) {
             // init interceptor by letting it proxy the real endpoint
             sendTo.proxyEndpoint(getCamelContext());
             route.addOutput(sendTo);
@@ -206,26 +203,28 @@
     }
 
     /**
-     * Creates and adds an interceptor
+     * Creates and adds an interceptor that is triggered when an exchange
+     * is received as input to any routes (eg from all the <tt>from</tt>)
      *
      * @return the interceptor builder to configure
      */
-    public InterceptDefinition intercept() {
-        InterceptDefinition answer = new InterceptDefinition();
-        getIntercepts().add(answer);
+    public InterceptFromDefinition interceptFrom() {
+        InterceptFromDefinition answer = new InterceptFromDefinition();
+        getInterceptFroms().add(answer);
         return answer;
     }
 
     /**
-     * Creates and adds an interceptor that is attached with a predicate
+     * Creates and adds an interceptor that is triggered when an exchange is received
+     * as input to the route defined with the given endpoint (eg from the <tt>from</tt>)
      *
-     * @param predicate  the predicate
-     * @return the builder
+     * @param uri uri of the endpoint
+     * @return the interceptor builder to configure
      */
-    public ChoiceDefinition intercept(Predicate predicate) {
-        InterceptDefinition answer = new InterceptDefinition();
-        getIntercepts().add(answer);
-        return answer.when(predicate);
+    public InterceptFromDefinition interceptFrom(final String uri) {
+        InterceptFromDefinition answer = new InterceptFromDefinition(uri);
+        getInterceptFroms().add(answer);
+        return answer;
     }
 
     /**

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java Fri May  1 17:02:31 2009
@@ -120,20 +120,6 @@
     void addEventDrivenProcessor(Processor processor);
 
     /**
-     * Intercepts with the given interceptor
-     *
-     * @param interceptor the interceptor
-     */
-    void intercept(Intercept interceptor);
-
-    /**
-     * Creates a proceed processor
-     *
-     * @return the created proceed processor
-     */
-    Processor createProceedProcessor();
-
-    /**
      * This method retrieves the InterceptStrategy instances this route context.
      *
      * @return the strategy

Modified: camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index (original)
+++ camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index Fri May  1 17:02:31 2009
@@ -29,7 +29,7 @@
 IdempotentConsumerDefinition
 InOnlyDefinition
 InOutDefinition
-InterceptDefinition
+InterceptFromDefinition
 InterceptSendToEndpointDefinition
 LoadBalanceDefinition
 LoopDefinition

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromLogTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorLogTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromLogTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromLogTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorLogTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorLogTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromLogTest.java Fri May  1 17:02:31 2009
@@ -23,31 +23,29 @@
 /**
  * Testing http://camel.apache.org/dsl.html
  */
-public class InterceptorLogTest extends ContextTestSupport {
+public class InterceptFromLogTest extends ContextTestSupport {
 
     public void testInterceptor() throws Exception {
-        MockEndpoint intercept = getMockEndpoint("mock:intercept");
-        intercept.expectedMessageCount(2);
+        getMockEndpoint("mock:foo").expectedMessageCount(2);
+        getMockEndpoint("mock:bar").expectedMessageCount(2);
+
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(1);
         mock.expectedBodiesReceived("Hello World");
 
         template.sendBody("seda:foo", "Hello World");
 
-        intercept.assertIsSatisfied();
-        mock.assertIsSatisfied();
+        assertMockEndpointsSatisfied();
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                // lets log all steps in all routes (must use proceed to let the exchange continue its
-                // normal route path instead of swallowing it here by our intercepter.
-                intercept().to("log:foo").proceed().to("mock:intercept");
-                intercept().to("log:bar").proceed();
+                interceptFrom().to("log:foo").to("mock:foo").proceed();
+                interceptFrom().to("log:bar").to("mock:bar"); // proceed is default
 
                 from("seda:foo").to("seda:bar");
-                from("seda:bar").intercept().to("log:cheese").to("mock:result");
+                from("seda:bar").to("mock:result");
             }
         };
     }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromLogTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromLogTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromPredicateProceedAndStopTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorPredicateProceedAndStopTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromPredicateProceedAndStopTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromPredicateProceedAndStopTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorPredicateProceedAndStopTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptorPredicateProceedAndStopTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromPredicateProceedAndStopTest.java Fri May  1 17:02:31 2009
@@ -23,12 +23,12 @@
 /**
  * Testing http://camel.apache.org/dsl.html
  */
-public class InterceptorPredicateProceedAndStopTest extends ContextTestSupport {
+public class InterceptFromPredicateProceedAndStopTest extends ContextTestSupport {
 
     public void testInterceptorNoPredicate() throws Exception {
         context.addRoutes(new RouteBuilder() {
             public void configure() throws Exception {
-                intercept().to("mock:test");
+                interceptFrom().to("mock:test");
                 from("seda:order").to("mock:ok");
             }
         });
@@ -48,7 +48,7 @@
     public void testInterceptorNoPredicateAndProceed() throws Exception {
         context.addRoutes(new RouteBuilder() {
             public void configure() throws Exception {
-                intercept().to("mock:test").proceed();
+                interceptFrom().to("mock:test").proceed();
                 from("seda:order").to("mock:ok");
             }
         });
@@ -68,7 +68,7 @@
     public void testInterceptorNoPredicateAndStop() throws Exception {
         context.addRoutes(new RouteBuilder() {
             public void configure() throws Exception {
-                intercept().to("mock:test").stop();
+                interceptFrom().to("mock:test").stop();
                 from("seda:order").to("mock:ok");
             }
         });
@@ -88,7 +88,7 @@
     public void testInterceptorWithPredicate() throws Exception {
         context.addRoutes(new RouteBuilder() {
             public void configure() throws Exception {
-                intercept(header("user").isEqualTo("test")).to("mock:test");
+                interceptFrom().when(header("user").isEqualTo("test")).to("mock:test");
                 from("seda:order").to("mock:ok");
             }
         });
@@ -108,7 +108,7 @@
     public void testInterceptorWithPredicateAndProceed() throws Exception {
         context.addRoutes(new RouteBuilder() {
             public void configure() throws Exception {
-                intercept(header("user").isEqualTo("test")).to("mock:test").proceed();
+                interceptFrom().when(header("user").isEqualTo("test")).to("mock:test").proceed();
                 from("seda:order").to("mock:ok");
             }
         });
@@ -128,7 +128,7 @@
     public void testInterceptorWithPredicateAndStop() throws Exception {
         context.addRoutes(new RouteBuilder() {
             public void configure() throws Exception {
-                intercept(header("user").isEqualTo("test")).to("mock:test").stop();
+                interceptFrom().when(header("user").isEqualTo("test")).to("mock:test").stop();
                 from("seda:order").to("mock:ok");
             }
         });

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromPredicateProceedAndStopTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/InterceptFromPredicateProceedAndStopTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java Fri May  1 17:02:31 2009
@@ -16,10 +16,7 @@
  */
 package org.apache.camel.model;
 
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
-
 import javax.xml.bind.JAXBException;
 
 import org.apache.camel.model.language.ExpressionDefinition;

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/IntercepFromWithPredicateTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IntercepWithPredicateTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/IntercepFromWithPredicateTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/IntercepFromWithPredicateTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IntercepWithPredicateTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IntercepWithPredicateTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/IntercepFromWithPredicateTest.java Fri May  1 17:02:31 2009
@@ -14,21 +14,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class IntercepWithPredicateTest extends InterceptRouteTestSupport {
+public class IntercepFromWithPredicateTest extends InterceptFromRouteTestSupport {
 
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 // intercept with a predicate test
-                intercept(header("foo").isEqualTo("bar")).to("mock:b").stop();
+                interceptFrom().when(header("foo").isEqualTo("bar")).to("mock:b").stop();
                 
                 from("direct:start").to("mock:a");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/IntercepFromWithPredicateTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/IntercepFromWithPredicateTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTest.java Fri May  1 17:02:31 2009
@@ -14,19 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class InterceptRouteTest extends InterceptRouteTestSupport {
+public class InterceptFromRouteTest extends InterceptFromRouteTestSupport {
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                intercept().choice().
+                interceptFrom().choice().
                         when(header("foo").isEqualTo("bar")).to("mock:b").
                         otherwise().proceed();
 

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTestSupport.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTestSupport.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTestSupport.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTestSupport.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTestSupport.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptRouteTestSupport.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTestSupport.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
@@ -22,7 +22,7 @@
 /**
  * @version $Revision$
  */
-public abstract class InterceptRouteTestSupport extends ContextTestSupport {
+public abstract class InterceptFromRouteTestSupport extends ContextTestSupport {
     protected MockEndpoint a;
     protected MockEndpoint b;
 

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTestSupport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromRouteTestSupport.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleLogTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleLogTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleLogTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleLogTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleLogTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleLogTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleLogTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
@@ -22,7 +22,7 @@
 /**
  * Testing http://camel.apache.org/dsl.html
  */
-public class InterceptorSimpleLogTest extends ContextTestSupport {
+public class InterceptFromSimpleLogTest extends ContextTestSupport {
 
     public void testInterceptLog() throws Exception {
         getMockEndpoint("mock:result").expectedMessageCount(1);
@@ -38,7 +38,7 @@
             public void configure() throws Exception {
                 // START SNIPPET: e1
                 // intercept all incomming routes and log it
-                intercept().to("log:received");
+                interceptFrom().to("log:received");
 
                 // and here we have a couple of routes
                 from("direct:start").to("mock:first").to("seda:bar");

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleLogTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleLogTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateTest.java (from r770656, 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/intercept/InterceptFromSimplePredicateTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateTest.java&r1=770656&r2=770754&rev=770754&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/intercept/InterceptFromSimplePredicateTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
@@ -24,7 +24,7 @@
 /**
  * Testing http://camel.apache.org/dsl.html
  */
-public class InterceptorSimplePredicateTest extends ContextTestSupport {
+public class InterceptFromSimplePredicateTest extends ContextTestSupport {
 
     public void testNoIntercept() throws Exception {
         getMockEndpoint("mock:intercepted").expectedMessageCount(0);
@@ -48,7 +48,7 @@
         return new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: e1
-                intercept()
+                interceptFrom()
                     .when(header("usertype").isEqualTo("test"))
                     .process(new MyTestServiceProcessor())
                     .to("mock:intercepted");

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateWithStopTest.java (from r770656, 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/intercept/InterceptFromSimplePredicateWithStopTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateWithStopTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimplePredicateWithStopTest.java&r1=770656&r2=770754&rev=770754&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/intercept/InterceptFromSimplePredicateWithStopTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
@@ -22,7 +22,7 @@
 /**
  * Testing http://camel.apache.org/dsl.html
  */
-public class InterceptorSimplePredicateWithStopTest extends ContextTestSupport {
+public class InterceptFromSimplePredicateWithStopTest extends ContextTestSupport {
 
     public void testIntercept() throws Exception {
         getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
@@ -37,7 +37,7 @@
         return new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: e1
-                intercept()
+                interceptFrom()
                     .when(header("usertype").isEqualTo("test"))
                     // here we use stop() to tell Camel to NOT continue routing the message.
                     // this let us act as a filter, to drop certain messages.

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateWithStopTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimplePredicateWithStopTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleRouteTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleRouteTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptorSimpleRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleRouteTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
@@ -23,7 +23,7 @@
 /**
  * A simple interceptor routing test
  */
-public class InterceptorSimpleRouteTest extends ContextTestSupport {
+public class InterceptFromSimpleRouteTest extends ContextTestSupport {
 
     public void testIntercept() throws Exception {
         MockEndpoint intercepted = getMockEndpoint("mock:intercepted");
@@ -43,7 +43,7 @@
         return new RouteBuilder() {
             public void configure() throws Exception {
                 // In Camel 1.4 proceed is default so we must use stop to not route it to the result mock
-                intercept(header("city").isEqualTo("London")).to("mock:intercepted").stop();
+                interceptFrom().when(header("city").isEqualTo("London")).to("mock:intercepted").stop();
                 from("seda:a").to("mock:result");
             }
         };

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromSimpleRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenNoStopTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenNoStopTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenNoStopTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
@@ -24,7 +24,7 @@
 /**
  * @version $Revision$
  */
-public class InterceptWhenNoStopTest extends ContextTestSupport {
+public class InterceptFromWhenNoStopTest extends ContextTestSupport {
 
     public void testInterceptorWhen() throws Exception {
         getMockEndpoint("mock:goofy").expectedMessageCount(0);
@@ -49,7 +49,7 @@
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                intercept().when(toPredicate(simple("${body} contains 'Goofy'"))).to("mock:goofy");
+                interceptFrom().when(toPredicate(simple("${body} contains 'Goofy'"))).to("mock:goofy");
 
                 from("direct:start").to("mock:end");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenNoStopTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
@@ -24,7 +24,7 @@
 /**
  * @version $Revision$
  */
-public class InterceptWhenTest extends ContextTestSupport {
+public class InterceptFromWhenTest extends ContextTestSupport {
 
     public void testInterceptorWhen() throws Exception {
         getMockEndpoint("mock:goofy").expectedMessageCount(0);
@@ -49,7 +49,7 @@
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                intercept().when(toPredicate(simple("${body} contains 'Goofy'"))).to("mock:goofy").stop();
+                interceptFrom().when(toPredicate(simple("${body} contains 'Goofy'"))).to("mock:goofy").stop();
 
                 from("direct:start").to("mock:end");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenWithChoiceTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenWithChoiceTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWhenWithChoiceTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
@@ -24,7 +24,7 @@
 /**
  * @version $Revision$
  */
-public class InterceptWhenWithChoiceTest extends ContextTestSupport {
+public class InterceptFromWhenWithChoiceTest extends ContextTestSupport {
 
     public void testInterceptorHelloWorld() throws Exception {
         getMockEndpoint("mock:goofy").expectedMessageCount(0);
@@ -64,7 +64,7 @@
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                intercept()
+                interceptFrom()
                     .when(toPredicate(simple("${body} contains 'Goofy'")))
                         .choice()
                             .when(body().contains("Hello")).to("mock:hello")

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWhenWithChoiceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndProceedRouteTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndProceedRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndProceedRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndProceedRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndProceedRouteTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndProceedRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndProceedRouteTest.java Fri May  1 17:02:31 2009
@@ -14,19 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class InterceptWithPredicateAndProceedRouteTest extends InterceptRouteTestSupport {
+public class InterceptFromWithPredicateAndProceedRouteTest extends InterceptFromRouteTestSupport {
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                intercept(header("foo").isEqualTo("bar")).to("mock:b").proceed();
+                interceptFrom().when(header("foo").isEqualTo("bar")).to("mock:b").proceed();
 
                 from("direct:start").to("mock:a");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndProceedRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndProceedRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndStopRouteTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndStopRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndStopRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndStopRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndStopRouteTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateAndStopRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndStopRouteTest.java Fri May  1 17:02:31 2009
@@ -14,20 +14,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class InterceptWithPredicateAndStopRouteTest extends InterceptRouteTestSupport {
+public class InterceptFromWithPredicateAndStopRouteTest extends InterceptFromRouteTestSupport {
 
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                intercept(header("foo").isEqualTo("bar")).to("mock:b").stop();
+                interceptFrom().when(header("foo").isEqualTo("bar")).to("mock:b").stop();
 
                 from("direct:start").to("mock:a");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndStopRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateAndStopRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateRouteTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateRouteTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithPredicateRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateRouteTest.java Fri May  1 17:02:31 2009
@@ -14,20 +14,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class InterceptWithPredicateRouteTest extends InterceptRouteTestSupport {
+public class InterceptFromWithPredicateRouteTest extends InterceptFromRouteTestSupport {
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 // no stop so the message will proceed in its normal route also
-                intercept(header("foo").isEqualTo("bar")).to("mock:b");
+                interceptFrom().when(header("foo").isEqualTo("bar")).to("mock:b");
 
                 from("direct:start").to("mock:a");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithPredicateRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithStopRouteTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithStopRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithStopRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithStopRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithStopRouteTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithStopRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithStopRouteTest.java Fri May  1 17:02:31 2009
@@ -14,20 +14,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class InterceptWithStopRouteTest extends InterceptRouteTestSupport {
+public class InterceptFromWithStopRouteTest extends InterceptFromRouteTestSupport {
 
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                intercept().filter(header("foo").isEqualTo("bar")).to("mock:b").stop();
+                interceptFrom().filter(header("foo").isEqualTo("bar")).to("mock:b").stop();
 
                 from("direct:start").to("mock:a");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithStopRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithStopRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithoutProceedRouteTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithoutProceedRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithoutProceedRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithoutProceedRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithoutProceedRouteTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptWithoutProceedRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithoutProceedRouteTest.java Fri May  1 17:02:31 2009
@@ -14,19 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class InterceptWithoutProceedRouteTest extends InterceptRouteTestSupport {
+public class InterceptFromWithoutProceedRouteTest extends InterceptFromRouteTestSupport {
     @Override
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                intercept().filter(header("foo").isEqualTo("bar")).to("mock:b");
+                interceptFrom().filter(header("foo").isEqualTo("bar")).to("mock:b");
 
                 from("direct:start").to("mock:a");
             }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithoutProceedRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptFromWithoutProceedRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToEndpointTest.java (from r770656, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptSendToEndpointTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToEndpointTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToEndpointTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptSendToEndpointTest.java&r1=770656&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/InterceptSendToEndpointTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToEndpointTest.java Fri May  1 17:02:31 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel.processor.intercept;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToEndpointTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToEndpointTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala (original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala Fri May  1 17:02:31 2009
@@ -32,7 +32,6 @@
   def idempotentconsumer(expression: Exchange => Any): SIdempotentConsumerDefinition
   def inOnly(): SProcessorDefinition
   def inOut(): SProcessorDefinition
-  def intercept(expression: Exchange => Boolean) : SInterceptDefinition
   def loadbalance : SLoadBalanceDefinition
   def loop(expression: Exchange => Any) : SLoopDefinition
   def marshal(format : DataFormatDefinition) : DSL

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala (original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala Fri May  1 17:02:31 2009
@@ -82,12 +82,6 @@
   def inOnly = new SProcessorDefinition(target.inOnly.asInstanceOf[RawProcessorDefinition])
   def inOut = new SProcessorDefinition(target.inOut.asInstanceOf[RawProcessorDefinition])
   
-  def intercept(expression: Exchange => Boolean) = {
-      val intercept = target.intercept
-      intercept.when(new ScalaPredicate(expression))
-      new SInterceptDefinition(intercept)
-  }
- 
   def loop(expression: Exchange => Any) = new SLoopDefinition(target.loop(expression))
   
   def marshal(format: DataFormatDefinition) = {

Copied: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptFromDefinition.scala (from r770746, camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptDefinition.scala)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptFromDefinition.scala?p2=camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptFromDefinition.scala&p1=camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptDefinition.scala&r1=770746&r2=770754&rev=770754&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptDefinition.scala (original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptFromDefinition.scala Fri May  1 17:02:31 2009
@@ -16,17 +16,17 @@
  */
 package org.apache.camel.scala.dsl;
 
-import org.apache.camel.model.InterceptDefinition
+import org.apache.camel.model.InterceptFromDefinition
 import org.apache.camel.scala.dsl.builder.RouteBuilder
 
 /**
- * Scala enrichment for Camel's IdempotentConsumerDefinition
+ * Scala enrichment for Camel's InterceptFromDefinition
  */
-class SInterceptDefinition(val target: InterceptDefinition)(implicit val builder: RouteBuilder) extends SAbstractDefinition with Wrapper[InterceptDefinition] {
+class SInterceptFromDefinition(val target: InterceptFromDefinition)(implicit val builder: RouteBuilder) extends SAbstractDefinition with Wrapper[InterceptFromDefinition] {
   
   val unwrap = target
   
-  override def apply(block: => Unit) : SInterceptDefinition = {
+  override def apply(block: => Unit) : SInterceptFromDefinition = {
     builder.build(this, block)
     this
   }

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala (original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala Fri May  1 17:02:31 2009
@@ -70,10 +70,10 @@
   def idempotentconsumer(expression: Exchange => Any) = stack.top.idempotentconsumer(expression)
   def inOnly = stack.top.inOnly
   def inOut = stack.top.inOut
-  def intercept(expression: Exchange => Boolean) = {
-  	val intercept = builder.intercept
-  	intercept.when(new ScalaPredicate(expression))
-  	new SInterceptDefinition(intercept)(this)
+  def interceptFrom(expression: Exchange => Boolean) = {
+  	val interceptFrom = builder.interceptFrom
+  	interceptFrom.when(new ScalaPredicate(expression))
+  	new SInterceptFromDefinition(interceptFrom)(this)
   }
   def loop(expression: Exchange => Any) = stack.top.loop(expression)
   def split(expression: Exchange => Any) = stack.top.split(expression)

Modified: camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptorTest.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptorTest.scala?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptorTest.scala (original)
+++ camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptorTest.scala Fri May  1 17:02:31 2009
@@ -34,7 +34,7 @@
 
   val builder = new RouteBuilder {
      //START SNIPPET: simple
-     intercept(_.in(classOf[String]) == "Nighthawk") {
+     interceptFrom(_.in(classOf[String]) == "Nighthawk") {
 		to ("mock:intercepted")     	
      } stop
      

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=770754&r1=770753&r2=770754&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java (original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java Fri May  1 17:02:31 2009
@@ -35,7 +35,7 @@
 import org.apache.camel.management.DefaultInstrumentationAgent;
 import org.apache.camel.management.InstrumentationLifecycleStrategy;
 import org.apache.camel.model.IdentifiedType;
-import org.apache.camel.model.InterceptDefinition;
+import org.apache.camel.model.InterceptFromDefinition;
 import org.apache.camel.model.InterceptSendToEndpointDefinition;
 import org.apache.camel.model.OnExceptionDefinition;
 import org.apache.camel.model.PolicyDefinition;
@@ -120,8 +120,8 @@
     private DataFormatsDefinition dataFormats;
     @XmlElement(name = "onException", required = false)
     private List<OnExceptionDefinition> onExceptions = new ArrayList<OnExceptionDefinition>();
-    @XmlElement(name = "intercept", required = false)
-    private List<InterceptDefinition> intercepts = new ArrayList<InterceptDefinition>();
+    @XmlElement(name = "interceptFrom", required = false)
+    private List<InterceptFromDefinition> interceptFroms = new ArrayList<InterceptFromDefinition>();
     @XmlElement(name = "interceptSendToEndpoint", required = false)
     private List<InterceptSendToEndpointDefinition> interceptSendToEndpoints = new ArrayList<InterceptSendToEndpointDefinition>();
     @XmlElement(name = "route", required = false)
@@ -287,7 +287,7 @@
     }
 
     private void initInterceptors(RouteDefinition route) {
-        for (InterceptDefinition intercept : intercepts) {
+        for (InterceptFromDefinition intercept : interceptFroms) {
             List<ProcessorDefinition<?>> outputs = new ArrayList<ProcessorDefinition<?>>();
             List<ProcessorDefinition<?>> exceptionHandlers = new ArrayList<ProcessorDefinition<?>>();
             for (ProcessorDefinition output : route.getOutputs()) {
@@ -306,7 +306,7 @@
 
             // add the interceptor but we must do some pre configuration beforehand
             intercept.afterPropertiesSet();
-            InterceptDefinition proxy = intercept.createProxy();
+            InterceptFromDefinition proxy = intercept.createProxy();
             route.addOutput(proxy);
             route.pushBlock(proxy.getProceed());
 
@@ -447,12 +447,12 @@
         this.routes = routes;
     }
 
-    public List<InterceptDefinition> getIntercepts() {
-        return intercepts;
+    public List<InterceptFromDefinition> getInterceptFroms() {
+        return interceptFroms;
     }
 
-    public void setIntercepts(List<InterceptDefinition> intercepts) {
-        this.intercepts = intercepts;
+    public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms) {
+        this.interceptFroms = interceptFroms;
     }
 
     public List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints() {



Mime
View raw message