| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
| AggregationStrategy |
|
| 1.0;1 |
| 1 | /** |
|
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
| 3 | * contributor license agreements. See the NOTICE file distributed with |
|
| 4 | * this work for additional information regarding copyright ownership. |
|
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
| 6 | * (the "License"); you may not use this file except in compliance with |
|
| 7 | * the License. You may obtain a copy of the License at |
|
| 8 | * |
|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 10 | * |
|
| 11 | * Unless required by applicable law or agreed to in writing, software |
|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 14 | * See the License for the specific language governing permissions and |
|
| 15 | * limitations under the License. |
|
| 16 | */ |
|
| 17 | package org.apache.camel.processor.aggregate; |
|
| 18 | ||
| 19 | import org.apache.camel.Exchange; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * A strategy for aggregating two exchanges together into a single exchange. |
|
| 23 | * Possible implementations include performing some kind of combining or delta |
|
| 24 | * processing, such as adding line items together into an invoice or just using |
|
| 25 | * the newest exchange and removing old exchanges such as for state tracking or |
|
| 26 | * market data prices; where old values are of little use. |
|
| 27 | * |
|
| 28 | * @version $Revision: 1.1 $ |
|
| 29 | */ |
|
| 30 | public interface AggregationStrategy { |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Aggregates an old and new exchange together to create a single combined |
|
| 34 | * exchange |
|
| 35 | * |
|
| 36 | * @param oldExchange the oldest exchange |
|
| 37 | * @param newExchange the newest exchange |
|
| 38 | * @return a combined composite of the two exchanges |
|
| 39 | */ |
|
| 40 | Exchange aggregate(Exchange oldExchange, Exchange newExchange); |
|
| 41 | } |