org.mule.routing.inbound
Class IdempotentReceiver

java.lang.Object
  extended byorg.mule.routing.inbound.SelectiveConsumer
      extended byorg.mule.routing.inbound.IdempotentReceiver
All Implemented Interfaces:
UMOInboundRouter, UMORouter

public class IdempotentReceiver
extends SelectiveConsumer

IdempotentReceiver ensures that only unique messages are received by a component. 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. This implementation is simple and not suitable in a failover environment, this is because previously received message Ids are stored in memory and not persisted.

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason

Field Summary
 
Fields inherited from class org.mule.routing.inbound.SelectiveConsumer
logger
 
Constructor Summary
IdempotentReceiver()
           
 
Method Summary
 java.lang.String getStorePath()
           
 boolean isDisablePersistence()
           
 boolean isMatch(UMOEvent event)
           
protected  void load(java.lang.String componentName)
           
 UMOEvent[] process(UMOEvent event)
           
 void setDisablePersistence(boolean disablePersistence)
           
 void setStorePath(java.lang.String storePath)
           
protected  void storeId(java.lang.Object id)
           
 
Methods inherited from class org.mule.routing.inbound.SelectiveConsumer
getFilter, getRouterStatistics, isTransformFirst, setFilter, setRouterStatistics, setTransformFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdempotentReceiver

public IdempotentReceiver()
Method Detail

isMatch

public boolean isMatch(UMOEvent event)
                throws RoutingException
Specified by:
isMatch in interface UMOInboundRouter
Overrides:
isMatch in class SelectiveConsumer
Throws:
RoutingException

process

public UMOEvent[] process(UMOEvent event)
                   throws RoutingException
Specified by:
process in interface UMOInboundRouter
Overrides:
process in class SelectiveConsumer
Throws:
RoutingException

load

protected void load(java.lang.String componentName)
             throws RoutingException
Throws:
RoutingException

storeId

protected void storeId(java.lang.Object id)
                throws RoutingException
Throws:
RoutingException

isDisablePersistence

public boolean isDisablePersistence()

setDisablePersistence

public void setDisablePersistence(boolean disablePersistence)

getStorePath

public java.lang.String getStorePath()

setStorePath

public void setStorePath(java.lang.String storePath)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.