camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r662969 - in /activemq/camel/trunk/camel-core/src: main/java/org/apache/camel/ main/java/org/apache/camel/converter/ main/java/org/apache/camel/model/ main/java/org/apache/camel/model/dataformat/ main/java/org/apache/camel/util/ test/java/o...
Date Wed, 04 Jun 2008 03:59:56 GMT
Author: ningjiang
Date: Tue Jun  3 20:59:56 2008
New Revision: 662969

URL: http://svn.apache.org/viewvc?rev=662969&view=rev
Log:
Using the one thread pool executor to fix the build , also fixed some CS errors in camel-core

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Intercept.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Intercept.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Intercept.java?rev=662969&r1=662968&r2=662969&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Intercept.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Intercept.java Tue Jun
 3 20:59:56 2008
@@ -23,8 +23,8 @@
  * @version $Revision:  $
  */
 public interface Intercept {
-    
-	Processor getInterceptorLogic();
-    
+
+    Processor getInterceptorLogic();
+
     void setInterceptorLogic(Processor interceptorLogic);
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java?rev=662969&r1=662968&r2=662969&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
Tue Jun  3 20:59:56 2008
@@ -46,7 +46,7 @@
      * Creates an iterator over the value
      */
     @SuppressWarnings("unchecked")
-	@Converter
+    @Converter
     public static Iterator iterator(Object value) {
     	return ObjectHelper.createIterator(value);
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java?rev=662969&r1=662968&r2=662969&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java
Tue Jun  3 20:59:56 2008
@@ -68,24 +68,27 @@
         return aggregationStrategy;
     }
 
-    public void setAggregationStrategy(AggregationStrategy aggregationStrategy) {
+    public MulticastType setAggregationStrategy(AggregationStrategy aggregationStrategy)
{
         this.aggregationStrategy = aggregationStrategy;
+        return this;
     }
 
     public boolean isParallelProcessing() {
         return parallelProcessing != null ? parallelProcessing : false;
     }
 
-    public void setParallelProcessing(boolean parallelProcessing) {
+    public MulticastType setParallelProcessing(boolean parallelProcessing) {
         this.parallelProcessing = parallelProcessing;
+        return this;
     }
 
     public ThreadPoolExecutor getThreadPoolExecutor() {
         return threadPoolExecutor;
     }
 
-    public void setThreadPoolExecutor(ThreadPoolExecutor executor) {
+    public MulticastType setThreadPoolExecutor(ThreadPoolExecutor executor) {
         this.threadPoolExecutor = executor;
+        return this;
     }
 
     @Override

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java?rev=662969&r1=662968&r2=662969&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
Tue Jun  3 20:59:56 2008
@@ -64,7 +64,7 @@
 
     @Override
     protected void configureDataFormat(DataFormat dataFormat) {
-    	Boolean answer = ObjectHelper.toBoolean(getPrettyPrint());
+        Boolean answer = ObjectHelper.toBoolean(getPrettyPrint());
         if (answer != null && answer.booleanValue()) {
             setProperty(dataFormat, "prettyPrint", Boolean.TRUE);
         }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=662969&r1=662968&r2=662969&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Tue Jun  3 20:59:56 2008
@@ -144,7 +144,7 @@
         }
         return null;
     }
-    
+
     public static void notNull(Object value, String name) {
         if (value == null) {
             throw new IllegalArgumentException(name + " must be specified");
@@ -205,7 +205,7 @@
      * Returns true if the collection contains the specified value
      */
     @SuppressWarnings("unchecked")
-	public static boolean contains(Object collectionOrArray, Object value) {
+    public static boolean contains(Object collectionOrArray, Object value) {
         if (collectionOrArray instanceof Collection) {
             Collection collection = (Collection)collectionOrArray;
             return collection.contains(value);

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java?rev=662969&r1=662968&r2=662969&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
Tue Jun  3 20:59:56 2008
@@ -16,6 +16,10 @@
  */
 package org.apache.camel.processor;
 
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
@@ -107,9 +111,12 @@
 
         return new RouteBuilder() {
             public void configure() {
+                ThreadPoolExecutor tpExecutor = new ThreadPoolExecutor(1, 1, 0, TimeUnit.MILLISECONDS,
new ArrayBlockingQueue<Runnable>(10));
                 // START SNIPPET: example
                 // The message will be sent parallelly to the endpoints
-                from("direct:parallel").multicast(new BodyOutAggregatingStrategy(), true).to("direct:x",
"direct:y", "direct:z");
+                from("direct:parallel")
+                    .multicast(new BodyOutAggregatingStrategy(), true).setThreadPoolExecutor(tpExecutor)
+                        .to("direct:x", "direct:y", "direct:z");
                 // Multicast the message in a sequential way
                 from("direct:sequential").multicast(new BodyOutAggregatingStrategy()).to("direct:x",
"direct:y", "direct:z");
 



Mime
View raw message