Class StringAggregationStrategy

java.lang.Object
org.apache.camel.processor.aggregate.StringAggregationStrategy
All Implemented Interfaces:
org.apache.camel.AggregationStrategy

@Metadata(label="bean", description="Aggregate result of pick expression into a single combined Exchange holding all the aggregated bodies in a String as the message body. This aggregation strategy can used in combination with Splitter to batch messages", annotations="interfaceName=org.apache.camel.AggregationStrategy") @Configurer(metadataOnly=true) public class StringAggregationStrategy extends Object implements org.apache.camel.AggregationStrategy
Aggregate result of pick expression into a single combined Exchange holding all the aggregated bodies in a String as the message body. This aggregation strategy can used in combination with Splitter to batch messages
  • Constructor Details

    • StringAggregationStrategy

      public StringAggregationStrategy()
  • Method Details

    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter(String delimiter)
    • getPickExpression

      public org.apache.camel.Expression getPickExpression()
    • setPickExpression

      public void setPickExpression(org.apache.camel.Expression pickExpression)
    • delimiter

      public StringAggregationStrategy delimiter(String delimiter)
      Set delimiter used for joining aggregated String
      Parameters:
      delimiter - The delimiter to join with. Default empty String
    • pick

      public StringAggregationStrategy pick(org.apache.camel.Expression expression)
      Set an expression to extract the element to be aggregated from the incoming Exchange.

      By default, it picks the full IN message body of the incoming exchange.

      Parameters:
      expression - The picking expression.
      Returns:
      This instance.
    • aggregate

      public org.apache.camel.Exchange aggregate(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)
      Specified by:
      aggregate in interface org.apache.camel.AggregationStrategy
    • onCompletion

      public void onCompletion(org.apache.camel.Exchange exchange)
      Specified by:
      onCompletion in interface org.apache.camel.AggregationStrategy