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