org.mule.routing.inbound
Class SelectiveConsumer
java.lang.Object
org.mule.routing.inbound.SelectiveConsumer
- All Implemented Interfaces:
- UMOInboundRouter, UMORouter
- Direct Known Subclasses:
- AbstractEventAggregator, AbstractEventResequencer, ForwardingConsumer, IdempotentReceiver, InboundPassThroughRouter, WireTap
- public class SelectiveConsumer
- extends Object
- implements UMOInboundRouter
SelectiveConsumer is an inbound router used to filter out unwanted
events. The filtering is performed by a UMOFilter that can be set
on the router. If the event does not match the filter a
UMOROutnerCatchAllStrategy can be set on this router to route
unwanted events. If a catch strategy is not set the router just returns null.
- Version:
- $Revision: 3798 $
- Author:
- Ross Mason
|
Field Summary |
protected Log |
logger
logger used by this class |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected transient Log logger
- logger used by this class
SelectiveConsumer
public SelectiveConsumer()
isMatch
public boolean isMatch(UMOEvent event)
throws MessagingException
- Description copied from interface:
UMOInboundRouter
- Determines if the event should be processed by this router. Routers can be
selectively invoked by configuing a filter on them. Usually the filter is
applied to the event when calling this method. All core Mule inbound routers
extend the SelectiveConsumer router.
- Specified by:
isMatch in interface UMOInboundRouter
- Parameters:
event - the current event to evaluate
- Returns:
- true if the event should be processed by this router
- Throws:
MessagingException - if the event cannot be evaluated- See Also:
SelectiveConsumer
process
public UMOEvent[] process(UMOEvent event)
throws MessagingException
- Description copied from interface:
UMOInboundRouter
- A received UMOEvent is passed to this method for processing. The router can
control processing by either 1. passing back a null to indicate that the
router has either discarded the event of the event has been stored for further
processing. A reaosn for storing the event might be that other events in it's
correlation group are expected to be received. 2. Pass back an array of one or
more events to be processed by the component. Often 1 event is returned, i.e.
in the case of event aggregation. The router may return an array of events if
a set of events have been resequenced or multiple events have been generated
from a single event.
- Specified by:
process in interface UMOInboundRouter
- Parameters:
event - the event received by the inbound endpoint before it is passed to
the component
- Returns:
- null to indicate the event has been stored/destroyed or an array of
events to be processed by the component
- Throws:
MessagingException - if an error occurs during processing of the event
getFilter
public UMOFilter getFilter()
setFilter
public void setFilter(UMOFilter filter)
isTransformFirst
public boolean isTransformFirst()
setTransformFirst
public void setTransformFirst(boolean transformFirst)
setRouterStatistics
public void setRouterStatistics(RouterStatistics stats)
- Specified by:
setRouterStatistics in interface UMORouter
getRouterStatistics
public RouterStatistics getRouterStatistics()
- Specified by:
getRouterStatistics in interface UMORouter
Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.