|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.transport.polling.MessageProcessorPollingOverride org.mule.transport.polling.watermark.Watermark
public abstract class Watermark
Poll override that provides watermarking functionality: It enriches the event passed to the polling message processor to have a flow variable fetched from the object store defined, ensures the variable is carried over to the flow event if it is going to be executed, and saves the value of the variable back to the object store at the end of the flow.
A limitation of this implementation is that the poll must be embedded into a synchronous flow. An exception will be thrown if this is not the case.
Field Summary | |
---|---|
protected Map<QName,Object> |
annotations
The watermark annotations added to the definition |
Constructor Summary | |
---|---|
Watermark(ObjectStore<Serializable> objectStore,
String variable,
String defaultExpression)
|
Method Summary | |
---|---|
protected abstract Object |
getUpdatedValue(MuleEvent event)
This method is executed once the flow containing the poll has been executed. |
void |
putInto(MuleEvent event)
Retrieves the watermark value from the underlying peristent store and enriches the event.If there is no value stored, a default expression will be used to create a new one. |
protected String |
resolveVariable(MuleEvent event)
|
void |
updateFrom(MuleEvent event)
Updates the watermark in persistent storage based on the flow variable defined in the event |
void |
updateWith(MuleEvent event,
Serializable newValue)
|
Methods inherited from class org.mule.transport.polling.MessageProcessorPollingOverride |
---|
interceptor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<QName,Object> annotations
Constructor Detail |
---|
public Watermark(ObjectStore<Serializable> objectStore, String variable, String defaultExpression)
Method Detail |
---|
protected String resolveVariable(MuleEvent event)
public void putInto(MuleEvent event) throws ObjectStoreException
ObjectStoreException
public final void updateWith(MuleEvent event, Serializable newValue) throws ObjectStoreException
ObjectStoreException
public final void updateFrom(MuleEvent event) throws ObjectStoreException
event
- The event containing the watermark as a flow variable
ObjectStoreException
protected abstract Object getUpdatedValue(MuleEvent event)
event
- the MuleEvent
that was returned by the owning flow
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |