Author: ningjiang
Date: Wed Dec 10 23:30:58 2008
New Revision: 725606

URL: http://svn.apache.org/viewvc?rev=725606&view=rev
Log:
Merged revisions 725569,725572 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r725569 | ningjiang | 2008-12-11 12:10:08 +0800 (Thu, 11 Dec 2008) | 1 line
  
  CAMEL-1181 added the DSL support and tests
........
  r725572 | ningjiang | 2008-12-11 12:36:13 +0800 (Thu, 11 Dec 2008) | 1 line
  
  CAMEL-1181 added the snippet tags for wiki page
........

Added:
    
activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/SetExchangePatternTest.java
      - copied unchanged from r725572, 
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SetExchangePatternTest.java
    
activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringSetExchangePatternTest.java
      - copied unchanged from r725572, 
activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringSetExchangePatternTest.java
    
activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
      - copied unchanged from r725572, 
activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
Removed:
    
activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/ExchangePatternTest.java
    
activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java
    
activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/exchangePattern.xml
Modified:
    
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java

Modified: 
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java?rev=725606&r1=725605&r2=725606&view=diff
==============================================================================
--- 
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
 (original)
+++ 
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
 Wed Dec 10 23:30:58 2008
@@ -127,7 +127,8 @@
     public Type to(String uri) {
         addOutput(new ToType(uri));
         return (Type) this;
-    }
+    }   
+    
 
     /**
      * Sends the exchange to the given endpoint
@@ -136,6 +137,31 @@
         addOutput(new ToType(endpoint));
         return (Type) this;
     }
+    
+    /**
+     * Sends the exchange with certain exchange pattern to the given endpoint
+     *
+     * @param uri  the endpoint to send to
+     * @return the builder
+     */
+    public Type to(String uri, ExchangePattern ep) {
+        addOutput(new SetExchangePatternType(ep));
+        addOutput(new ToType(uri));        
+        return (Type) this;
+    }   
+    
+
+    /**
+     * Sends the exchange with certain exchange pattern to the given endpoint
+     *
+     * @param endpoint  the endpoint to send to
+     * @return the builder
+     */
+    public Type to(Endpoint endpoint, ExchangePattern ep) {
+        addOutput(new SetExchangePatternType(ep));
+        addOutput(new ToType(endpoint));
+        return (Type) this;
+    }
 
     /**
      * Sends the exchange to a list of endpoints
@@ -166,6 +192,8 @@
         }
         return (Type) this;
     }
+    
+    
 
     /**
      * Multicasts messages to all its child outputs; so that each processor and
@@ -1597,6 +1625,50 @@
     public Type inOut() {
         return setExchangePattern(ExchangePattern.InOut);
     }
+    
+    /**
+     * <a 
href="http://activemq.apache.org/camel/exchange-pattern.html";>ExchangePattern:</a>
+     * set the exchange's ExchangePattern [EMAIL PROTECTED] ExchangePattern} 
to be InOnly
+     *
+     * @param uri The endpoint uri which is used for sending the exchange
+     * @return the builder
+     */
+    public Type inOnly(String uri) {
+        return to(uri, ExchangePattern.InOnly);
+    }
+    
+    /**
+     * <a 
href="http://activemq.apache.org/camel/exchange-pattern.html";>ExchangePattern:</a>
+     * set the exchange's ExchangePattern [EMAIL PROTECTED] ExchangePattern} 
to be InOut
+     *
+     * @param uri The endpoint uri which is used for sending the exchange
+     * @return the builder
+     */
+    public Type inOut(String uri) {
+        return to(uri, ExchangePattern.InOut);
+    }
+    
+    /**
+     * <a 
href="http://activemq.apache.org/camel/exchange-pattern.html";>ExchangePattern:</a>
+     * set the exchange's ExchangePattern [EMAIL PROTECTED] ExchangePattern} 
to be InOnly
+     *
+     * @param uri The endpoint which is used for sending the exchange
+     * @return the builder
+     */
+    public Type inOnly(Endpoint endpoint) {
+        return to(endpoint, ExchangePattern.InOnly);
+    }
+    
+    /**
+     * <a 
href="http://activemq.apache.org/camel/exchange-pattern.html";>ExchangePattern:</a>
+     * set the exchange's ExchangePattern [EMAIL PROTECTED] ExchangePattern} 
to be InOut
+     *
+     * @param uri The endpoint which is used for sending the exchange
+     * @return the builder
+     */
+    public Type inOut(Endpoint endpoint) {
+        return to(endpoint, ExchangePattern.InOut);
+    }
 
     // Properties
     // 
-------------------------------------------------------------------------


Reply via email to