camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r725074 - in /activemq/camel/branches/camel-1.x: ./ camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/processor/ camel-core/src/main/resources/org/apache/ca...
Date Wed, 10 Dec 2008 12:49:59 GMT
Author: ningjiang
Date: Wed Dec 10 04:49:59 2008
New Revision: 725074

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

........
  r725040 | ningjiang | 2008-12-10 17:41:55 +0800 (Wed, 10 Dec 2008) | 1 line
  
  CAMEL-1171 supports to specify the ExchangePatterns explicitly in the routing DSL
........

Added:
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ExchangePatternType.java
      - copied unchanged from r725040, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExchangePatternType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/ExchangePatternProcessor.java
      - copied unchanged from r725040, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ExchangePatternProcessor.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/ExchangePatternTest.java
      - copied unchanged from r725040, activemq/camel/trunk/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
      - copied, changed from r725040, activemq/camel/trunk/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
      - copied unchanged from r725040, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/exchangePattern.xml
Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/CatchType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 10 04:49:59 2008
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangePattern.java?rev=725074&r1=725073&r2=725074&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
Wed Dec 10 04:49:59 2008
@@ -100,6 +100,14 @@
     public static ExchangePattern fromWsdlUri(String wsdlUri) {
         return MAP.get(wsdlUri);
     }
+    
+    public static ExchangePattern asEnum(String value) {
+        try {
+            return valueOf(value);
+        } catch (Exception e) {
+            throw new IllegalArgumentException("Unknown message exchange pattern: " + value);
+        }
+    }
 
     static {
         for (ExchangePattern mep : values()) {

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/CatchType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/CatchType.java?rev=725074&r1=725073&r2=725074&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/CatchType.java
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/CatchType.java
Wed Dec 10 04:49:59 2008
@@ -38,7 +38,7 @@
  */
 @XmlRootElement(name = "catch")
 @XmlAccessorType(XmlAccessType.FIELD)
-public class CatchType extends ProcessorType<ProcessorType> {
+public class CatchType extends ProcessorType<CatchType> {
     @XmlElement(name = "exception")
     private List<String> exceptions = new ArrayList<String>();
     @XmlElementRef

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=725074&r1=725073&r2=725074&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 04:49:59 2008
@@ -36,6 +36,7 @@
 import org.apache.camel.CamelException;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.Expression;
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
@@ -1562,6 +1563,40 @@
         addOutput(new MarshalType(dataTypeRef));
         return (Type) this;
     }
+    
+    /**
+     * <a href="http://activemq.apache.org/camel/exchange-pattern.html">ExchangePattern:</a>
+     * set the ExchangePattern {@link ExchangePattern} into the exchange
+     *
+     * @param exchangePattern  instance of {@link ExchangePattern} 
+     * @return the builder
+     */
+    public Type setExchangePattern(ExchangePattern exchangePattern) {
+        addOutput(new ExchangePatternType(exchangePattern));
+        return (Type) this;
+    }
+    
+    /**
+     * <a href="http://activemq.apache.org/camel/exchange-pattern.html">ExchangePattern:</a>
+     * set the exchange's ExchangePattern {@link ExchangePattern} to be InOnly
+     *
+     * 
+     * @return the builder
+     */
+    public Type inOnly() {
+        return setExchangePattern(ExchangePattern.InOnly);
+    }
+    
+    /**
+     * <a href="http://activemq.apache.org/camel/exchange-pattern.html">ExchangePattern:</a>
+     * set the exchange's ExchangePattern {@link ExchangePattern} to be InOut
+     *
+     * 
+     * @return the builder
+     */
+    public Type inOut() {
+        return setExchangePattern(ExchangePattern.InOut);
+    }
 
     // Properties
     // -------------------------------------------------------------------------

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index?rev=725074&r1=725073&r2=725074&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
Wed Dec 10 04:49:59 2008
@@ -22,6 +22,7 @@
 DelayerType
 Description
 ExceptionType
+ExchangePatternType
 ExpressionSubElementType
 FilterType
 FinallyType

Copied: activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java
(from r725040, activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java)
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java?p2=activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java&p1=activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java&r1=725040&r2=725074&rev=725074&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringExchangePatternTest.java
Wed Dec 10 04:49:59 2008
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,



Mime
View raw message