org.mule.routing
Class AbstractAggregator

java.lang.Object
  extended by org.mule.processor.AbstractInterceptingMessageProcessor
      extended by org.mule.routing.AbstractAggregator
All Implemented Interfaces:
FlowConstructAware, MuleContextAware, Initialisable, Startable, Stoppable, InterceptingMessageProcessor, MessageProcessor, Aggregator, MessageSource
Direct Known Subclasses:
AbstractCorrelationAggregator, BankQuotesResponseAggregator, MessageChunkAggregator, Resequencer, SimpleCollectionAggregator

public abstract class AbstractAggregator
extends AbstractInterceptingMessageProcessor
implements Initialisable, MuleContextAware, FlowConstructAware, Aggregator, Startable, Stoppable

AbstractEventAggregator will aggregate a set of messages into a single message. EIP Reference: http://www.eaipatterns.com/Aggregator.html


Field Summary
protected  EventCorrelator eventCorrelator
           
protected  FlowConstruct flowConstruct
           
protected  MessageInfoMapping messageInfoMapping
           
protected  MuleContext muleContext
           
 
Fields inherited from class org.mule.processor.AbstractInterceptingMessageProcessor
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
 
Constructor Summary
AbstractAggregator()
           
 
Method Summary
 void expireAggregation(String groupId)
           
protected abstract  EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)
           
 long getTimeout()
           
 void initialise()
          Method used to perform any initialisation work.
 boolean isFailOnTimeout()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void setFailOnTimeout(boolean failOnTimeout)
           
 void setFlowConstruct(FlowConstruct flowConstruct)
           
 void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)
           
 void setMuleContext(MuleContext context)
           
 void setTimeout(long timeout)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.mule.processor.AbstractInterceptingMessageProcessor
fireNotification, getMuleContext, processNext, setListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eventCorrelator

protected EventCorrelator eventCorrelator

muleContext

protected MuleContext muleContext

flowConstruct

protected FlowConstruct flowConstruct

messageInfoMapping

protected MessageInfoMapping messageInfoMapping
Constructor Detail

AbstractAggregator

public AbstractAggregator()
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
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

start

public void start()
           throws MuleException
Specified by:
start in interface Startable
Throws:
MuleException

stop

public void stop()
          throws MuleException
Specified by:
stop in interface Stoppable
Throws:
MuleException

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware
Overrides:
setMuleContext in class AbstractInterceptingMessageProcessor

getCorrelatorCallback

protected abstract EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)

process

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

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

expireAggregation

public void expireAggregation(String groupId)
Specified by:
expireAggregation in interface Aggregator

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)
Specified by:
setTimeout in interface Aggregator

isFailOnTimeout

public boolean isFailOnTimeout()

setFailOnTimeout

public void setFailOnTimeout(boolean failOnTimeout)
Specified by:
setFailOnTimeout in interface Aggregator

setFlowConstruct

public void setFlowConstruct(FlowConstruct flowConstruct)
Specified by:
setFlowConstruct in interface FlowConstructAware

setMessageInfoMapping

public void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)


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