org.mule.routing.inbound
Class IdempotentSecureHashReceiver

java.lang.Object
  extended by org.mule.routing.AbstractRouter
      extended by org.mule.routing.inbound.SelectiveConsumer
          extended by org.mule.routing.inbound.IdempotentReceiver
              extended by org.mule.routing.inbound.IdempotentSecureHashReceiver
All Implemented Interfaces:
UMOInboundRouter, UMORouter

public class IdempotentSecureHashReceiver
extends IdempotentReceiver

IdempotentSecureHashReceiver ensures that only unique messages are received by a component. It does this by calculating the SHA-256 hash of the message itself. This provides a value with an infinitesimally small chance of a collision. This can be used to filter message duplicates. Please keep in mind that the hash is calculated over the entire byte array representing the message, so any leading or trailing spaces or extraneous bytes (like padding) can produce different hash values for the same semantic message content. Care should be taken to ensure that messages do not contain extraneous bytes. This class is useful when the message does not support unique identifiers.


Field Summary
 
Fields inherited from class org.mule.routing.inbound.IdempotentReceiver
assignedComponentName, expirationInterval, idStore, maxMessages, messageTTL
 
Fields inherited from class org.mule.routing.inbound.SelectiveConsumer
logger
 
Constructor Summary
IdempotentSecureHashReceiver()
           
 
Method Summary
protected  Object getIdForEvent(UMOEvent event)
           
 
Methods inherited from class org.mule.routing.inbound.IdempotentReceiver
createMessageIdStore, getExpirationInterval, getMaxMessages, getMessageTTL, initialize, isMatch, process, setExpirationInterval, setMaxMessages, setMessageTTL
 
Methods inherited from class org.mule.routing.inbound.SelectiveConsumer
getFilter, isTransformFirst, setFilter, setTransformFirst
 
Methods inherited from class org.mule.routing.AbstractRouter
getRouterStatistics, setRouterStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.umo.routing.UMORouter
getRouterStatistics, setRouterStatistics
 

Constructor Detail

IdempotentSecureHashReceiver

public IdempotentSecureHashReceiver()
Method Detail

getIdForEvent

protected Object getIdForEvent(UMOEvent event)
                        throws MessagingException
Overrides:
getIdForEvent in class IdempotentReceiver
Throws:
MessagingException


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.