org.mule.transport.polling.watermark
Class WatermarkPollingInterceptor

java.lang.Object
  extended by org.mule.transport.polling.MessageProcessorPollingInterceptor
      extended by org.mule.transport.polling.watermark.WatermarkPollingInterceptor
Direct Known Subclasses:
SelectorWatermarkPollingInterceptor

public class WatermarkPollingInterceptor
extends MessageProcessorPollingInterceptor

Implementation of MessageProcessorPollingInterceptor that retrieves the current watermark value before the polling flow is executed and updates it when it is finished.

Since:
3.5.0

Field Summary
protected  Watermark watermark
           
 
Constructor Summary
WatermarkPollingInterceptor(Watermark watermark)
           
 
Method Summary
 void postProcessRouting(MuleEvent event)
          Watermark post processing saves the flow variable to the object store
 MuleEvent prepareRouting(MuleEvent sourceEvent, MuleEvent event)
          Watermark route preparation carries the value from the source event to the flow event
 MuleEvent prepareSourceEvent(MuleEvent event)
          Watermark source preprocessing puts the watermark value into a flow variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

watermark

protected final Watermark watermark
Constructor Detail

WatermarkPollingInterceptor

public WatermarkPollingInterceptor(Watermark watermark)
Method Detail

prepareSourceEvent

public MuleEvent prepareSourceEvent(MuleEvent event)
                             throws MuleException
Watermark source preprocessing puts the watermark value into a flow variable

Overrides:
prepareSourceEvent in class MessageProcessorPollingInterceptor
Parameters:
event - The event that is about to be sent
Returns:
The event that should be sent. Must not be null
Throws:
MuleException

prepareRouting

public MuleEvent prepareRouting(MuleEvent sourceEvent,
                                MuleEvent event)
                         throws ConfigurationException
Watermark route preparation carries the value from the source event to the flow event

Overrides:
prepareRouting in class MessageProcessorPollingInterceptor
Parameters:
sourceEvent - The event that was returned by the polling processor
event - The event that is about to be sent to the rest of the flow
Returns:
The event that should be sent to the rest of the flow. Must not be null
Throws:
ConfigurationException

postProcessRouting

public void postProcessRouting(MuleEvent event)
                        throws ObjectStoreException
Watermark post processing saves the flow variable to the object store

Overrides:
postProcessRouting in class MessageProcessorPollingInterceptor
Parameters:
event - The event that was routed to the rest of the flow
Throws:
ObjectStoreException


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.