@Deprecated public abstract class AbstractCatchAllStrategy extends Object implements OutboundRouterCatchAllStrategy, RouterStatisticsRecorder
RouterCatchAllStrategy
is a strategy interface that allows developers to hook in custom code when
an event is being routed on the inbound or outbound but does not match any of the criteria defined for the routing.
Think of catch all strategies as a safety net for your events to ensure that all events will get processed. If you
do not use conditional routing logic, you will not need a catch all strategy.
Note that it is advised to use this base class over the OutboundRouterCatchAllStrategy
interface
so that the RouterStatistics
are available.Modifier and Type | Field and Description |
---|---|
protected Log |
logger
Deprecated.
logger used by this class
|
protected RouterStatistics |
statistics
Deprecated.
Router statistics used to monitor if a catch all strategy is invoked and if any events are dispatched
from the strategy i.e.
|
Constructor and Description |
---|
AbstractCatchAllStrategy()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract MuleEvent |
doCatchMessage(MuleEvent event)
Deprecated.
|
RouterStatistics |
getRouterStatistics()
Deprecated.
|
MuleEvent |
process(MuleEvent event)
Deprecated.
This method will be invoked when an event is received or being sent where the criteria of the router(s) do not
match the current event.
|
void |
setRouterStatistics(RouterStatistics statistics)
Deprecated.
|
protected transient Log logger
protected RouterStatistics statistics
ForwardingCatchAllStrategy
.public RouterStatistics getRouterStatistics()
public void setRouterStatistics(RouterStatistics statistics)
setRouterStatistics
in interface RouterStatisticsRecorder
public final MuleEvent process(MuleEvent event) throws RoutingException
process
in interface MessageProcessor
process
in interface OutboundRouterCatchAllStrategy
event
- the current event being processedRoutingException
- if there is a failure while processing this message.public abstract MuleEvent doCatchMessage(MuleEvent event) throws RoutingException
RoutingException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.