org.mule.routing
Class Resequencer

java.lang.Object
  extended by org.mule.processor.AbstractInterceptingMessageProcessorBase
      extended by org.mule.processor.AbstractInterceptingMessageProcessor
          extended by org.mule.routing.AbstractAggregator
              extended by org.mule.routing.Resequencer
All Implemented Interfaces:
AnnotatedObject, FlowConstructAware, MuleContextAware, Initialisable, Startable, Stoppable, InterceptingMessageProcessor, MessageProcessor, Aggregator, MessageSource

public class Resequencer
extends AbstractAggregator

Resequencer is used to resequence events according to their dispatch sequence in the correlation group. When the message splitter router splits an event it assigns a correlation sequence to the individual message parts so that another router such as the Resequencer can receive the parts and reorder or merge them.

EIP Reference: http:// www.eaipatterns.com/Resequencer.html


Field Summary
protected  Comparator eventComparator
           
 
Fields inherited from class org.mule.routing.AbstractAggregator
eventCorrelator, flowConstruct, messageInfoMapping, muleContext, persistentStores, storePrefix
 
Fields inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
logger, next, notificationHandler
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
Resequencer()
           
 
Method Summary
protected  EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)
           
 Comparator getEventComparator()
           
 void initialise()
          Method used to perform any initialisation work.
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void setEventComparator(Comparator eventComparator)
           
 
Methods inherited from class org.mule.routing.AbstractAggregator
expireAggregation, getStorePrefix, getTimeout, isFailOnTimeout, isPersistentStores, setFailOnTimeout, setFlowConstruct, setMessageInfoMapping, setMuleContext, setPersistentStores, setStorePrefix, setTimeout, start, stop
 
Methods inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, processNext, setAnnotations, setListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.source.MessageSource
setListener
 

Field Detail

eventComparator

protected Comparator eventComparator
Constructor Detail

Resequencer

public Resequencer()
Method Detail

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Overrides:
initialise in class AbstractAggregator
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

getEventComparator

public Comparator getEventComparator()

setEventComparator

public void setEventComparator(Comparator eventComparator)

getCorrelatorCallback

protected EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)
Specified by:
getCorrelatorCallback in class AbstractAggregator

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Specified by:
process in interface MessageProcessor
Overrides:
process in class AbstractAggregator
Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.