public abstract class AbstractEventResequencer extends SelectiveConsumer
AbstractEventResequencer
is used to receive a set of events,
resequence them and forward them on to their destinationModifier and Type | Field and Description |
---|---|
protected static String |
NO_CORRELATION_ID |
logger
muleContext
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractEventResequencer() |
Modifier and Type | Method and Description |
---|---|
protected EventGroup |
addEventGroup(EventGroup group) |
protected EventGroup |
createEventGroup(MuleEvent event,
Object groupId) |
Comparator |
getComparator() |
protected EventGroup |
getEventGroup(Object groupId) |
protected Object |
getEventGroupIdForEvent(MuleEvent event) |
MuleEvent[] |
process(MuleEvent event)
A received MuleEvent is passed to this method for processing.
|
protected void |
removeEventGroup(EventGroup group) |
protected MuleEvent[] |
resequenceEvents(EventGroup events)
Reorder collected events according to the configured Comparator.
|
void |
setComparator(Comparator eventComparator) |
protected abstract boolean |
shouldResequenceEvents(EventGroup events)
Determines whether the events in the passed EventGroup are ready to be
reordered.
|
getFilter, getMessageInfoMapping, isMatch, isTransformFirst, setFilter, setMessageInfoMapping, setTransformFirst
dispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatistics
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRouterStatistics, setRouterStatistics
initialise
dispose
protected static final String NO_CORRELATION_ID
public Comparator getComparator()
public void setComparator(Comparator eventComparator)
public MuleEvent[] process(MuleEvent event) throws MessagingException
InboundRouter
process
in interface InboundRouter
process
in class SelectiveConsumer
event
- the event received by the inbound endpoint before it is passed to
the serviceMessagingException
- if an error occurs during processing of the eventprotected EventGroup createEventGroup(MuleEvent event, Object groupId)
AbstractEventAggregator#createEventGroup(MuleEvent, Object)
protected Object getEventGroupIdForEvent(MuleEvent event)
AbstractEventAggregator#getEventGroupIdForEvent(MuleEvent)
protected EventGroup getEventGroup(Object groupId)
AbstractEventAggregator#getEventGroup(Object)
protected EventGroup addEventGroup(EventGroup group)
AbstractEventAggregator#addEventGroup(EventGroup)
protected void removeEventGroup(EventGroup group)
AbstractEventAggregator#removeEventGroup(EventGroup)
protected MuleEvent[] resequenceEvents(EventGroup events)
events
- the EventGroup used for collecting the eventsgetComparator()
. If no comparator is configured, the events
are returned unsorted.protected abstract boolean shouldResequenceEvents(EventGroup events)
AbstractEventAggregator#shouldAggregateEvents(EventGroup)
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.