public class CollectionCorrelatorCallback extends Object implements EventCorrelatorCallback
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger
logger used by this class
|
protected MuleContext |
muleContext |
| Constructor and Description |
|---|
CollectionCorrelatorCallback(MuleContext muleContext,
String storePrefix) |
| Modifier and Type | Method and Description |
|---|---|
Event |
aggregateEvents(EventGroup events)
This method is invoked if the shouldAggregate method is called and returns true.
|
EventGroup |
createEventGroup(Event event,
Object groupId)
Creates a new EventGroup that will expect the number of events as returned by
GroupCorrelation.getGroupSize(). |
protected MuleSession |
getMergedSession(Event[] events) |
boolean |
shouldAggregateEvents(EventGroup events)
Determines if the event group is ready to be aggregated.
|
protected final transient org.slf4j.Logger logger
protected MuleContext muleContext
public CollectionCorrelatorCallback(MuleContext muleContext, String storePrefix)
public Event aggregateEvents(EventGroup events) throws AggregationException
aggregateEvents in interface EventCorrelatorCallbackevents - the event group for this requestAggregationException - if the aggregation fails. in this scenario the whole event group
is removed and passed to the exception handler for this componentprotected MuleSession getMergedSession(Event[] events)
public EventGroup createEventGroup(Event event, Object groupId)
GroupCorrelation.getGroupSize().createEventGroup in interface EventCorrelatorCallbackevent - the current eventgroupId - The group idpublic boolean shouldAggregateEvents(EventGroup events)
EventCorrelatorCallbackshouldAggregateEvents in interface EventCorrelatorCallbackevents - The current event group received by the correlatortrue if the correlation size is not set or exactly the expected size of the event group.EventCorrelatorCallback.shouldAggregateEvents(org.mule.runtime.core.routing.EventGroup)Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.