org.mule.routing.outbound
Class OutboundRouterCollection

java.lang.Object
  extended byorg.mule.routing.AbstractRouterCollection
      extended byorg.mule.routing.outbound.OutboundRouterCollection
All Implemented Interfaces:
UMOOutboundRouterCollection, UMORouterCollection

public class OutboundRouterCollection
extends AbstractRouterCollection
implements UMOOutboundRouterCollection

OutboundRouterCollection is a container of routers. An OutboundRouterCollection 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, routers
 
Constructor Summary
OutboundRouterCollection()
           
 
Method Summary
protected  UMOMessage catchAll(UMOMessage message, UMOSession session, boolean synchronous)
           
 UMOEndpoint[] getEndpointsForMessage(UMOMessage message)
          A helper method for finding out which endpoints a message would be routed to without actually routing the the message
 boolean hasEndpoints()
          Determines if any endpoints have been set on this router.
 UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous)
          Prepares one or more events to be dispached by a Message Dispatcher.
 
Methods inherited from class org.mule.routing.AbstractRouterCollection
addRouter, getCatchAllStrategy, getRouters, getStatistics, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, 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.umo.routing.UMORouterCollection
addRouter, getCatchAllStrategy, getRouters, getStatistics, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, setRouters, setStatistics
 

Constructor Detail

OutboundRouterCollection

public OutboundRouterCollection()
Method Detail

route

public UMOMessage route(UMOMessage message,
                        UMOSession session,
                        boolean synchronous)
                 throws MessagingException
Description copied from interface: UMOOutboundRouterCollection
Prepares one or more events to be dispached by a Message Dispatcher.

Specified by:
route in interface UMOOutboundRouterCollection
Parameters:
message - The source Message
session - The current session
Returns:
a list containing 0 or events to be dispatched
Throws:
MessagingException

getEndpointsForMessage

public UMOEndpoint[] getEndpointsForMessage(UMOMessage message)
                                     throws MessagingException
A helper method for finding out which endpoints a message would be routed to without actually routing the the message

Specified by:
getEndpointsForMessage in interface UMOOutboundRouterCollection
Parameters:
message - the message to retrieve endpoints for
Returns:
an array of UMOEndpoint objects or an empty array
Throws:
RoutingException
MessagingException

catchAll

protected UMOMessage catchAll(UMOMessage message,
                              UMOSession session,
                              boolean synchronous)
                       throws RoutingException
Throws:
RoutingException

hasEndpoints

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

Specified by:
hasEndpoints in interface UMOOutboundRouterCollection
Returns:


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