public class EventCorrelator extends Object
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap |
eventGroups
A map of EventGroup objects.
|
protected 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 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 ConcurrentMap eventGroups
protected final ConcurrentMap locks
protected final 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.WorkException
public Map getResponseMessages()
public MuleMessage process(MuleEvent event) throws RoutingException
RoutingException
public void addEvent(MuleEvent event) throws RoutingException
RoutingException
protected 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
- RoutingException
public MuleMessage getResponse(MuleMessage message, int timeout) throws RoutingException
message
- RoutingException
public boolean isFailOnTimeout()
public void setFailOnTimeout(boolean failOnTimeout)
public int getTimeout()
public void setTimeout(int timeout)
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.