org.mule.transport.polling.watermark.selector
Class SelectorWatermarkPollingInterceptor

java.lang.Object
  extended by org.mule.transport.polling.MessageProcessorPollingInterceptor
      extended by org.mule.transport.polling.watermark.WatermarkPollingInterceptor
          extended by org.mule.transport.polling.watermark.selector.SelectorWatermarkPollingInterceptor

public class SelectorWatermarkPollingInterceptor
extends WatermarkPollingInterceptor

Implementation of WatermarkPollingInterceptor that uses a WatermarkSelector to return the new watermark value.

Since:
3.5.0

Field Summary
 
Fields inherited from class org.mule.transport.polling.watermark.WatermarkPollingInterceptor
watermark
 
Constructor Summary
SelectorWatermarkPollingInterceptor(Watermark watermark, WatermarkSelector selector, String selectorExpression)
           
 
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
 
Methods inherited from class org.mule.transport.polling.watermark.WatermarkPollingInterceptor
prepareSourceEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectorWatermarkPollingInterceptor

public SelectorWatermarkPollingInterceptor(Watermark watermark,
                                           WatermarkSelector selector,
                                           String selectorExpression)
Method Detail

prepareRouting

public MuleEvent prepareRouting(MuleEvent sourceEvent,
                                MuleEvent event)
                         throws ConfigurationException

Watermark route preparation carries the value from the source event to the flow event

If the payload is a Iterable, then it is iterated passing all values evaluated through the selector. This is so because not only different kinds of collections can be traversed in unpredictable ways, but also collections are often copied before being iterated in which case we have no interception point.

If the payload is an Iterator, then a static proxy is generated so that we can intercept all values an evaluate them through the selector. Notice that if the Iterable or Iterator are not fully consumed, the unretrieved values will not be received by the WatermarkSelector

Overrides:
prepareRouting in class WatermarkPollingInterceptor
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
Description copied from class: WatermarkPollingInterceptor
Watermark post processing saves the flow variable to the object store

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


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