Class GroupedMessageAggregationStrategy

java.lang.Object
org.apache.camel.processor.aggregate.AbstractListAggregationStrategy<org.apache.camel.Message>
org.apache.camel.processor.aggregate.GroupedMessageAggregationStrategy
All Implemented Interfaces:
org.apache.camel.AggregationStrategy

@Metadata(label="bean", description="Aggregate all Message into a single combined Exchange holding all the aggregated messages in a List of Message as the message body. This aggregation strategy can be used in combination with Splitter to batch messages.", annotations="interfaceName=org.apache.camel.AggregationStrategy") @Configurer(metadataOnly=true) public class GroupedMessageAggregationStrategy extends AbstractListAggregationStrategy<org.apache.camel.Message>
Aggregate all Message into a single combined Exchange holding all the aggregated messages in a List of Message as the message body. This aggregation strategy can be used in combination with Splitter to batch messages
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.camel.Exchange
    aggregate(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)
    This method will aggregate the old and new exchange and return the result.
    org.apache.camel.Message
    getValue(org.apache.camel.Exchange exchange)
    This method is implemented by the sub-class and is called to retrieve an instance of the value that will be aggregated and forwarded to the receiving end point.

    Methods inherited from class org.apache.camel.processor.aggregate.AbstractListAggregationStrategy

    isStoreAsBodyOnCompletion, onCompletion

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.AggregationStrategy

    aggregate, canPreComplete, onCompletion, onOptimisticLockFailure, preComplete, timeout
  • Constructor Details

    • GroupedMessageAggregationStrategy

      public GroupedMessageAggregationStrategy()
  • Method Details

    • aggregate

      public org.apache.camel.Exchange aggregate(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)
      Description copied from class: AbstractListAggregationStrategy
      This method will aggregate the old and new exchange and return the result.
      Specified by:
      aggregate in interface org.apache.camel.AggregationStrategy
      Overrides:
      aggregate in class AbstractListAggregationStrategy<org.apache.camel.Message>
      Parameters:
      oldExchange - The oldest exchange, can be null
      newExchange - The newest exchange, can be null
      Returns:
      a composite exchange of the old and/or new exchanges
    • getValue

      public org.apache.camel.Message getValue(org.apache.camel.Exchange exchange)
      Description copied from class: AbstractListAggregationStrategy
      This method is implemented by the sub-class and is called to retrieve an instance of the value that will be aggregated and forwarded to the receiving end point.

      If null is returned, then the value is not added to the List.

      Specified by:
      getValue in class AbstractListAggregationStrategy<org.apache.camel.Message>
      Parameters:
      exchange - The exchange that is used to retrieve the value from
      Returns:
      An instance of V that is the associated value of the passed exchange