You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/02/24 12:13:04 UTC

[camel] branch master updated: Renamed to better name. Fixed CS.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new a12d53f  Renamed to better name. Fixed CS.
a12d53f is described below

commit a12d53f368c149e23c689f70f29f2a47b539829c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Feb 24 13:12:50 2018 +0100

    Renamed to better name. Fixed CS.
---
 .../aggregate/BatchAggregationStrategy.java        | 16 ----------
 .../aggregate/GroupedBodyAggregationStrategy.java  | 35 ++++++++++++++++++++++
 .../camel/util/toolbox/AggregationStrategies.java  |  7 +++--
 3 files changed, 39 insertions(+), 19 deletions(-)

diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/BatchAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/BatchAggregationStrategy.java
deleted file mode 100644
index 2394888..0000000
--- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/BatchAggregationStrategy.java
+++ /dev/null
@@ -1,16 +0,0 @@
-import org.apache.camel.Exchange;
-import org.apache.camel.processor.aggregate.AbstractListAggregationStrategy;
-
-/**
- * Aggregate body of input {@link Message} into a single combined Exchange holding all the
- * aggregated bodies in a {@link List} of type {@link Object} as the message body.
- *
- * This aggregation strategy can used in combination with {@link org.apache.camel.processor.Splitter} to batch messages
- *
- * @version
- */
-public class BatchAggregationStrategy extends AbstractListAggregationStrategy<Object> {
-    public Object getValue(Exchange exchange) {
-        return exchange.getIn().getBody();
-    }
-}
diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedBodyAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedBodyAggregationStrategy.java
new file mode 100644
index 0000000..0b39504
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/GroupedBodyAggregationStrategy.java
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor.aggregate;
+
+import java.util.List;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+
+/**
+ * Aggregate body of input {@link Message} into a single combined Exchange holding all the
+ * aggregated bodies in a {@link List} of type {@link Object} as the message body.
+ *
+ * This aggregation strategy can used in combination with {@link org.apache.camel.processor.Splitter} to batch messages
+ */
+public class GroupedBodyAggregationStrategy extends AbstractListAggregationStrategy<Object> {
+
+    public Object getValue(Exchange exchange) {
+        return exchange.getIn().getBody();
+    }
+}
diff --git a/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java b/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java
index 4fda638..a601598 100644
--- a/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java
+++ b/camel-core/src/main/java/org/apache/camel/util/toolbox/AggregationStrategies.java
@@ -18,6 +18,7 @@ package org.apache.camel.util.toolbox;
 
 import org.apache.camel.processor.aggregate.AggregationStrategy;
 import org.apache.camel.processor.aggregate.AggregationStrategyBeanAdapter;
+import org.apache.camel.processor.aggregate.GroupedBodyAggregationStrategy;
 import org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy;
 import org.apache.camel.processor.aggregate.UseLatestAggregationStrategy;
 import org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy;
@@ -76,10 +77,10 @@ public final class AggregationStrategies {
     }
 
     /**
-     * Creates a {@link BatchAggregationStrategy} aggregation strategy.
+     * Creates a {@link GroupedBodyAggregationStrategy} aggregation strategy.
      */
-    public static AggregationStrategy batch() {
-        return new BatchAggregationStrategy();
+    public static AggregationStrategy groupedBody() {
+        return new GroupedBodyAggregationStrategy();
     }
 
     /**

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.