org.mule.routing.outbound
Class DefaultOutboundRouterCollection

java.lang.Object
  extended by org.mule.routing.AbstractRouterCollection
      extended by org.mule.routing.outbound.DefaultOutboundRouterCollection
All Implemented Interfaces:
MuleContextAware, Disposable, Initialisable, OutboundRouterCollection, RouterCollection

public class DefaultOutboundRouterCollection
extends AbstractRouterCollection
implements OutboundRouterCollection

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
 
Fields inherited from class org.mule.routing.AbstractRouterCollection
logger, matchAll, muleContext, routers
 
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
protected  MuleMessage catchAll(MuleMessage message, MuleSession session)
           
 boolean hasEndpoints()
          Determines if any endpoints have been set on this router.
 MuleMessage route(MuleMessage message, MuleSession session)
          Prepares one or more events to be dispached by a Message Dispatcher.
 
Methods inherited from class org.mule.routing.AbstractRouterCollection
addRouter, dispose, getCatchAllStrategy, getRouters, getStatistics, initialise, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, setMuleContext, setRouters, setStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.routing.RouterCollection
addRouter, getCatchAllStrategy, getRouters, getStatistics, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, setRouters, setStatistics
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Constructor Detail

DefaultOutboundRouterCollection

public DefaultOutboundRouterCollection()
Method Detail

route

public MuleMessage route(MuleMessage message,
                         MuleSession session)
                  throws MessagingException
Description copied from interface: OutboundRouterCollection
Prepares one or more events to be dispached by a Message Dispatcher.

Specified by:
route in interface OutboundRouterCollection
Parameters:
message - The source Message
session - The current session
Returns:
a list containing 0 or events to be dispatched
Throws:
RoutingException - If any of the events cannot be created.
MessagingException

catchAll

protected MuleMessage catchAll(MuleMessage message,
                               MuleSession session)
                        throws RoutingException
Throws:
RoutingException

hasEndpoints

public boolean hasEndpoints()
Description copied from interface: OutboundRouterCollection
Determines if any endpoints have been set on this router.

Specified by:
hasEndpoints in interface OutboundRouterCollection
Returns:


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.