org.mule.routing.outbound
Class OutboundMessageRouter

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

public class OutboundMessageRouter
extends AbstractRouterCollection
implements UMOOutboundMessageRouter

OutboundMessageRouter is a container of routers. An OutboundMessageRouter 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.

Version:
$Revision: 1.8 $
Author:
Ross Mason

Field Summary
protected static Log logger
          logger used by this class
 
Fields inherited from class org.mule.routing.AbstractRouterCollection
matchAll, routers
 
Constructor Summary
OutboundMessageRouter()
           
 
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
 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
 

Field Detail

logger

protected static transient Log logger
logger used by this class

Constructor Detail

OutboundMessageRouter

public OutboundMessageRouter()
Method Detail

route

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

Specified by:
route in interface UMOOutboundMessageRouter
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 UMOOutboundMessageRouter
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


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.