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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Exchangeaggregate(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange) Set delimiter used for joining aggregated Stringorg.apache.camel.ExpressionvoidonCompletion(org.apache.camel.Exchange exchange) pick(org.apache.camel.Expression expression) Set an expression to extract the element to be aggregated from the incomingExchange.voidsetDelimiter(String delimiter) voidsetPickExpression(org.apache.camel.Expression pickExpression) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.AggregationStrategy
aggregate, canPreComplete, onCompletion, onOptimisticLockFailure, preComplete, timeout
-
Constructor Details
-
StringAggregationStrategy
public StringAggregationStrategy()
-
-
Method Details
-
getDelimiter
-
setDelimiter
-
getPickExpression
public org.apache.camel.Expression getPickExpression() -
setPickExpression
public void setPickExpression(org.apache.camel.Expression pickExpression) -
delimiter
Set delimiter used for joining aggregated String- Parameters:
delimiter- The delimiter to join with. Default empty String
-
pick
Set an expression to extract the element to be aggregated from the incomingExchange. 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:
aggregatein interfaceorg.apache.camel.AggregationStrategy
-
onCompletion
public void onCompletion(org.apache.camel.Exchange exchange) - Specified by:
onCompletionin interfaceorg.apache.camel.AggregationStrategy
-