|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.routing.outbound.DefaultOutboundRouterCollection
public class DefaultOutboundRouterCollection
DefaultOutboundRouterCollection
is a container of routers. An
DefaultOutboundRouterCollection must have atleast one router. By default the first
matching router is used to route an event though it is possible to match on all
routers meaning that the message will get sent over all matching routers.
Field Summary | |
---|---|
protected Log |
logger
logger used by this class |
protected boolean |
matchAll
|
protected MuleContext |
muleContext
|
protected List<MatchableMessageProcessor> |
routers
|
protected RouterStatistics |
statistics
|
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
DefaultOutboundRouterCollection()
|
Method Summary | |
---|---|
void |
addRoute(MatchableMessageProcessor router)
|
protected MuleEvent |
catchAll(MuleEvent event)
|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
OutboundRouterCatchAllStrategy |
getCatchAllStrategy()
|
RouterStatistics |
getRouterStatistics()
|
List<MatchableMessageProcessor> |
getRoutes()
|
boolean |
hasEndpoints()
Determines if any targets have been set on this router. |
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isMatchAll()
|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor. |
void |
removeRoute(MatchableMessageProcessor router)
|
void |
setCatchAllStrategy(OutboundRouterCatchAllStrategy catchAllStrategy)
|
void |
setMatchAll(boolean matchAll)
|
void |
setMessageProcessors(List<MatchableMessageProcessor> routers)
Deprecated. |
void |
setMuleContext(MuleContext context)
|
void |
setRouterStatistics(RouterStatistics stat)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final transient Log logger
protected List<MatchableMessageProcessor> routers
protected boolean matchAll
protected RouterStatistics statistics
protected MuleContext muleContext
Constructor Detail |
---|
public DefaultOutboundRouterCollection()
Method Detail |
---|
public MuleEvent process(MuleEvent event) throws MessagingException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processed
MessagingException
protected MuleEvent catchAll(MuleEvent event) throws RoutingException
RoutingException
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered frompublic void dispose()
Disposable
dispose
in interface Disposable
@Deprecated public void setMessageProcessors(List<MatchableMessageProcessor> routers)
public void addRoute(MatchableMessageProcessor router)
addRoute
in interface MatchingRouter
public void removeRoute(MatchableMessageProcessor router)
removeRoute
in interface MatchingRouter
public List<MatchableMessageProcessor> getRoutes()
getRoutes
in interface OutboundRouterCollection
public OutboundRouterCatchAllStrategy getCatchAllStrategy()
getCatchAllStrategy
in interface OutboundRouterCollection
public void setCatchAllStrategy(OutboundRouterCatchAllStrategy catchAllStrategy)
setCatchAllStrategy
in interface OutboundRouterCollection
public boolean isMatchAll()
isMatchAll
in interface OutboundRouterCollection
public void setMatchAll(boolean matchAll)
setMatchAll
in interface OutboundRouterCollection
public RouterStatistics getRouterStatistics()
getRouterStatistics
in interface OutboundRouterCollection
public void setRouterStatistics(RouterStatistics stat)
setRouterStatistics
in interface RouterStatisticsRecorder
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public boolean hasEndpoints()
OutboundRouterCollection
hasEndpoints
in interface OutboundRouterCollection
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |