public class IdempotentMessageValidator extends org.mule.runtime.api.meta.AbstractAnnotatedObject implements Processor, MuleContextAware, FlowConstructAware, org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Disposable
IdempotentMessageValidator ensures that only unique messages are passed on. 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.EIP Reference: http://www.eaipatterns.com/IdempotentReceiver.html
ReactiveProcessor.ProcessingType| Modifier and Type | Field and Description |
|---|---|
protected FlowConstruct |
flowConstruct |
protected String |
idExpression |
protected MuleContext |
muleContext |
protected org.mule.runtime.api.store.ObjectStore<String> |
store |
protected String |
storePrefix |
protected String |
valueExpression |
| Constructor and Description |
|---|
IdempotentMessageValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected org.mule.runtime.api.store.ObjectStore<String> |
createMessageIdStore() |
void |
dispose() |
String |
getIdExpression() |
protected String |
getIdForEvent(Event event) |
org.mule.runtime.api.store.ObjectStore<String> |
getObjectStore() |
String |
getValueExpression() |
protected String |
getValueForEvent(Event event) |
void |
initialise() |
protected boolean |
isNewMessage(Event event) |
Event |
process(Event event)
Invokes the MessageProcessor.
|
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setIdExpression(String idExpression) |
void |
setMuleContext(MuleContext context) |
void |
setObjectStore(org.mule.runtime.api.store.ObjectStore<String> store) |
void |
setStorePrefix(String storePrefix) |
void |
setValueExpression(String valueExpression) |
getAnnotation, getAnnotations, getLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessingTypeprotected MuleContext muleContext
protected FlowConstruct flowConstruct
protected volatile org.mule.runtime.api.store.ObjectStore<String> store
protected String storePrefix
protected String idExpression
protected String valueExpression
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarecontext - the Mule node.public void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct in interface FlowConstructAwarepublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposableprotected org.mule.runtime.api.store.ObjectStore<String> createMessageIdStore() throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationExceptionprotected String getValueForEvent(Event event) throws MessagingException
MessagingExceptionprotected String getIdForEvent(Event event) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionpublic String getIdExpression()
public void setIdExpression(String idExpression)
public org.mule.runtime.api.store.ObjectStore<String> getObjectStore()
public void setObjectStore(org.mule.runtime.api.store.ObjectStore<String> store)
public final Event process(Event event) throws org.mule.runtime.api.exception.MuleException
Processorprotected boolean isNewMessage(Event event)
public String getValueExpression()
public void setValueExpression(String valueExpression)
public void setStorePrefix(String storePrefix)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.