Class MyAggregationStrategy

  • All Implemented Interfaces:
    org.apache.camel.AggregationStrategy

    public class MyAggregationStrategy
    extends Object
    implements org.apache.camel.AggregationStrategy
    This is the aggregation strategy which is java code for aggregating incoming messages with the existing aggregated message. In other words you use this strategy to merge the messages together.
    • Constructor Detail

      • MyAggregationStrategy

        public MyAggregationStrategy()
    • Method Detail

      • aggregate

        public org.apache.camel.Exchange aggregate​(org.apache.camel.Exchange oldExchange,
                                                   org.apache.camel.Exchange newExchange)
        Aggregates the messages.
        Specified by:
        aggregate in interface org.apache.camel.AggregationStrategy
        Parameters:
        oldExchange - the existing aggregated message. Is null the very first time as there are no existing message.
        newExchange - the incoming message. This is never null.
        Returns:
        the aggregated message.