public class EventCorrelator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap |
eventGroups
A map of EventGroup objects.
|
protected edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap |
locks
A map of locks used to wait for response messages for a given message id
|
protected org.apache.commons.logging.Log |
logger
logger used by this class
|
static int |
MAX_PROCESSED_GROUPS |
static String |
NO_CORRELATION_ID |
protected org.apache.commons.collections.buffer.BoundedFifoBuffer |
processedGroups |
protected edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap |
responseMessages
The collection of messages that are ready to be returned to the callee.
|
| Constructor and Description |
|---|
EventCorrelator(EventCorrelatorCallback callback,
MessageInfoMapping messageInfoMapping,
MuleContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(MuleEvent event) |
protected EventGroup |
addEventGroup(EventGroup group) |
protected void |
addProcessedGroup(Object id) |
void |
enableTimeoutMonitor() |
protected EventGroup |
getEventGroup(Object groupId) |
MuleMessage |
getResponse(MuleMessage message)
This method is called by the responding callee thread and should return the
aggregated response message
|
MuleMessage |
getResponse(MuleMessage message,
int timeout)
This method is called by the responding callee thread and should return the
aggregated response message
|
Map |
getResponseMessages()
Deprecated.
this is used by a test, but I would like to remove this method
|
int |
getTimeout() |
boolean |
isFailOnTimeout() |
protected boolean |
isGroupAlreadyProcessed(Object id) |
MuleMessage |
process(MuleEvent event) |
protected void |
removeEventGroup(EventGroup group) |
void |
setFailOnTimeout(boolean failOnTimeout) |
void |
setTimeout(int timeout) |
protected final transient org.apache.commons.logging.Log logger
public static final String NO_CORRELATION_ID
public static final int MAX_PROCESSED_GROUPS
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap eventGroups
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap locks
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap responseMessages
protected final org.apache.commons.collections.buffer.BoundedFifoBuffer processedGroups
public EventCorrelator(EventCorrelatorCallback callback, MessageInfoMapping messageInfoMapping, MuleContext context)
public void enableTimeoutMonitor()
throws javax.resource.spi.work.WorkException
javax.resource.spi.work.WorkExceptionpublic Map getResponseMessages()
public MuleMessage process(MuleEvent event) throws RoutingException
RoutingExceptionpublic void addEvent(MuleEvent event) throws RoutingException
RoutingExceptionprotected EventGroup getEventGroup(Object groupId)
org.mule.routing.inbound.AbstractEventAggregator#getEventGroup(Object)protected EventGroup addEventGroup(EventGroup group)
org.mule.routing.inbound.AbstractEventAggregator#addEventGroup(EventGroup)protected void removeEventGroup(EventGroup group)
org.mule.routing.inbound.AbstractEventAggregator#removeEventGroup(EventGroup)protected void addProcessedGroup(Object id)
protected boolean isGroupAlreadyProcessed(Object id)
public MuleMessage getResponse(MuleMessage message) throws RoutingException
message - RoutingExceptionpublic MuleMessage getResponse(MuleMessage message, int timeout) throws RoutingException
message - RoutingExceptionpublic boolean isFailOnTimeout()
public void setFailOnTimeout(boolean failOnTimeout)
public int getTimeout()
public void setTimeout(int timeout)
Copyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.