camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r799794 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: Exchange.java impl/DefaultExchange.java processor/Pipeline.java processor/RoutingSlip.java
Date Sat, 01 Aug 2009 03:34:14 GMT
Author: hadrian
Date: Sat Aug  1 03:34:07 2009
New Revision: 799794

URL: http://svn.apache.org/viewvc?rev=799794&view=rev
Log:
CAMEL-1822. Removed Exchange.newInstance().

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RoutingSlip.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java?rev=799794&r1=799793&r2=799794&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java Sat Aug  1 03:34:07
2009
@@ -262,11 +262,6 @@
     CamelContext getContext();
 
     /**
-     * Creates a new exchange instance with empty messages, headers and properties
-     */
-    Exchange newInstance();
-
-    /**
      * Creates a copy of the current message exchange so that it can be
      * forwarded to another destination
      */

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java?rev=799794&r1=799793&r2=799794&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java Sat Aug
 1 03:34:07 2009
@@ -83,7 +83,7 @@
     }
 
     public Exchange copy() {
-        Exchange exchange = newInstance();
+        Exchange exchange = new DefaultExchange(this);
         exchange.copyFrom(this);
         return exchange;
     }
@@ -132,10 +132,6 @@
         return new ConcurrentHashMap<String, Object>(properties);
     }
 
-    public Exchange newInstance() {
-        return new DefaultExchange(this);
-    }
-
     public CamelContext getContext() {
         return context;
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java?rev=799794&r1=799793&r2=799794&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java Sat Aug
 1 03:34:07 2009
@@ -22,6 +22,7 @@
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.util.ExchangeHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -125,7 +126,7 @@
      * @return a new exchange
      */
     protected Exchange createNextExchange(Exchange previousExchange) {
-        Exchange answer = previousExchange.newInstance();
+        Exchange answer = new DefaultExchange(previousExchange);
         // we must use the same id as this is a snapshot strategy where Camel copies a snapshot
         // before processing the next step in the pipeline, so we have a snapshot of the
exchange
         // just before. This snapshot is used if Camel should do redeliveries (re try) using

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RoutingSlip.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RoutingSlip.java?rev=799794&r1=799793&r2=799794&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RoutingSlip.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RoutingSlip.java Sat Aug
 1 03:34:07 2009
@@ -23,6 +23,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.ProducerCallback;
+import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.impl.ProducerCache;
 import org.apache.camel.impl.ServiceSupport;
 import org.apache.camel.model.RoutingSlipDefinition;
@@ -69,7 +70,7 @@
         for (String nextRecipient : recipients) {
             Endpoint endpoint = resolveEndpoint(exchange, nextRecipient);
 
-            Exchange copy = current.newInstance();
+            Exchange copy = new DefaultExchange(current);
             updateRoutingSlip(current);
             copyOutToIn(copy, current);
 



Mime
View raw message