public class IdempotentReceiver extends SelectiveConsumer
IdempotentReceiver ensures that only unique messages are received by a
service. It does this by checking the unique ID of the incoming message. Note that
the underlying endpoint must support unique message IDs for this to work, otherwise a
UniqueIdNotSupportedException is thrown.IdempotentInMemoryMessageIdStore.| Modifier and Type | Field and Description |
|---|---|
protected String |
assignedComponentName |
protected String |
idExpression |
protected ObjectStore |
store |
loggermuleContextPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
IdempotentReceiver() |
| Modifier and Type | Method and Description |
|---|---|
protected ObjectStore |
createMessageIdStore() |
String |
getIdExpression() |
protected String |
getIdForEvent(MuleEvent event) |
ObjectStore |
getStore() |
protected void |
initialize(MuleEvent event) |
boolean |
isMatch(MuleEvent event)
Determines if the event should be processed by this router.
|
MuleEvent[] |
process(MuleEvent event)
A received MuleEvent is passed to this method for processing.
|
void |
setIdExpression(String idExpression) |
void |
setStore(ObjectStore store) |
getFilter, getMessageInfoMapping, isTransformFirst, setFilter, setMessageInfoMapping, setTransformFirstdispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatisticsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRouterStatistics, setRouterStatisticsinitialisedisposeprotected volatile ObjectStore store
protected volatile String assignedComponentName
protected String idExpression
protected void initialize(MuleEvent event) throws RoutingException
RoutingExceptionprotected ObjectStore createMessageIdStore() throws InitialisationException
InitialisationExceptionpublic boolean isMatch(MuleEvent event) throws MessagingException
InboundRouterisMatch in interface InboundRouterisMatch in class SelectiveConsumerevent - the current event to evaluateMessagingException - if the event cannot be evaluatedSelectiveConsumerpublic MuleEvent[] process(MuleEvent event) throws MessagingException
InboundRouterprocess in interface InboundRouterprocess in class SelectiveConsumerevent - the event received by the inbound endpoint before it is passed to
the serviceMessagingException - if an error occurs during processing of the eventprotected String getIdForEvent(MuleEvent event) throws MessagingException
MessagingExceptionpublic String getIdExpression()
public void setIdExpression(String idExpression)
public ObjectStore getStore()
public void setStore(ObjectStore store)
Copyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.