org.mule.routing.correlation
Class EventCorrelator

java.lang.Object
  extended by org.mule.routing.correlation.EventCorrelator

public class EventCorrelator
extends java.lang.Object


Field Summary
protected  edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap eventGroups
          A map of EventGroup objects.
protected  java.lang.Object groupsLock
           
protected  long groupTimeToLive
           
protected  Log logger
          logger used by this class
static int MAX_PROCESSED_GROUPS
           
protected static long MILLI_TO_NANO_MULTIPLIER
           
static java.lang.String NO_CORRELATION_ID
           
protected  BoundedFifoBuffer processedGroups
           
 
Constructor Summary
EventCorrelator(EventCorrelatorCallback callback, MessageProcessor timeoutMessageProcessor, MessageInfoMapping messageInfoMapping, MuleContext context)
           
 
Method Summary
protected  EventGroup addEventGroup(EventGroup group)
           
protected  void addProcessedGroup(java.lang.Object id)
           
 void enableTimeoutMonitor()
           
 void forceGroupExpiry(java.lang.String groupId)
           
protected  EventGroup getEventGroup(java.lang.String groupId)
           
 long getTimeout()
           
protected  void handleGroupExpiry(EventGroup group)
           
 boolean isFailOnTimeout()
           
protected  boolean isGroupAlreadyProcessed(java.lang.Object id)
           
 MuleEvent process(MuleEvent event)
           
protected  void removeEventGroup(EventGroup group)
           
 void setFailOnTimeout(boolean failOnTimeout)
           
 void setTimeout(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient Log logger
logger used by this class


NO_CORRELATION_ID

public static final java.lang.String NO_CORRELATION_ID
See Also:
Constant Field Values

MAX_PROCESSED_GROUPS

public static final int MAX_PROCESSED_GROUPS
See Also:
Constant Field Values

MILLI_TO_NANO_MULTIPLIER

protected static final long MILLI_TO_NANO_MULTIPLIER
See Also:
Constant Field Values

groupTimeToLive

protected long groupTimeToLive

eventGroups

protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap eventGroups
A map of EventGroup objects. These represent one or more messages to be agregated, keyed by message id. There will be one response message for every EventGroup.


groupsLock

protected final java.lang.Object groupsLock

processedGroups

protected final BoundedFifoBuffer processedGroups
Constructor Detail

EventCorrelator

public EventCorrelator(EventCorrelatorCallback callback,
                       MessageProcessor timeoutMessageProcessor,
                       MessageInfoMapping messageInfoMapping,
                       MuleContext context)
Method Detail

enableTimeoutMonitor

public void enableTimeoutMonitor()
                          throws javax.resource.spi.work.WorkException
Throws:
javax.resource.spi.work.WorkException

forceGroupExpiry

public void forceGroupExpiry(java.lang.String groupId)

process

public MuleEvent process(MuleEvent event)
                  throws RoutingException
Throws:
RoutingException

getEventGroup

protected EventGroup getEventGroup(java.lang.String groupId)

addEventGroup

protected EventGroup addEventGroup(EventGroup group)

removeEventGroup

protected void removeEventGroup(EventGroup group)

addProcessedGroup

protected void addProcessedGroup(java.lang.Object id)

isGroupAlreadyProcessed

protected boolean isGroupAlreadyProcessed(java.lang.Object id)

isFailOnTimeout

public boolean isFailOnTimeout()

setFailOnTimeout

public void setFailOnTimeout(boolean failOnTimeout)

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)

handleGroupExpiry

protected void handleGroupExpiry(EventGroup group)


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