|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.routing.AbstractRouter
org.mule.routing.inbound.SelectiveConsumer
org.mule.routing.inbound.AbstractEventAggregator
AbstractEventAggregator
will aggregate a set of messages into a
single message.
Field Summary | |
static String |
NO_CORRELATION_ID
|
Fields inherited from class org.mule.routing.inbound.SelectiveConsumer |
logger |
Constructor Summary | |
AbstractEventAggregator()
|
Method Summary | |
protected EventGroup |
addEventGroup(EventGroup group)
Add the given EventGroup to this aggregator's "group store". |
protected abstract UMOMessage |
aggregateEvents(EventGroup events)
This method is invoked if the shouldAggregate method is called and returns true. |
protected EventGroup |
createEventGroup(UMOEvent event,
Object groupId)
Create a new EventGroup with the specified groupId. |
protected EventGroup |
getEventGroup(Object groupId)
Look up the existing EventGroup with the given id. |
protected Object |
getEventGroupIdForEvent(UMOEvent event)
Returns the identifier by which events will be correlated. |
UMOEvent[] |
process(UMOEvent event)
A received UMOEvent is passed to this method for processing. |
protected void |
removeEventGroup(EventGroup group)
Remove the group from this aggregator's "store". |
protected abstract boolean |
shouldAggregateEvents(EventGroup events)
Determines if the event group is ready to be aggregated. |
Methods inherited from class org.mule.routing.inbound.SelectiveConsumer |
getFilter, isMatch, isTransformFirst, setFilter, setTransformFirst |
Methods inherited from class org.mule.routing.AbstractRouter |
getRouterStatistics, setRouterStatistics |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mule.umo.routing.UMORouter |
getRouterStatistics, setRouterStatistics |
Field Detail |
public static final String NO_CORRELATION_ID
Constructor Detail |
public AbstractEventAggregator()
Method Detail |
public UMOEvent[] process(UMOEvent event) throws MessagingException
UMOInboundRouter
process
in interface UMOInboundRouter
process
in class SelectiveConsumer
MessagingException
protected EventGroup createEventGroup(UMOEvent event, Object groupId)
event
- the event that caused creation of this group; can be used for
additional informationgroupId
- the id to use for the new EventGroup
protected Object getEventGroupIdForEvent(UMOEvent event)
UMOMessageAdapter.getCorrelationId()
.
event
- the event use for determining the correlation group id
protected EventGroup getEventGroup(Object groupId)
groupId
-
null
if the group
does not exist.protected EventGroup addEventGroup(EventGroup group)
EventGroup.getGroupId()
is used to match the group. Since group
creation/lookup/storage can happen fully concurrent, we return the stored
group. Callers are required to switch their method-local references when a
different group is returned.
group
- the EventGroup to "store"
protected void removeEventGroup(EventGroup group)
EventGroup.getGroupId()
is used to match the group.
group
- the EventGroup to removeprotected abstract boolean shouldAggregateEvents(EventGroup events)
events
-
protected abstract UMOMessage aggregateEvents(EventGroup events) throws AggregationException
events
- the event group for this request
AggregationException
- if the aggregation fails. in this scenario the
whole event group is removed and passed to the exception handler
for this componenet
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |