1 /* 2 * $Id: OutboundRouterCollection.java 11433 2008-03-20 03:43:57Z dirk.olmes $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com 5 * 6 * The software in this package is published under the terms of the CPAL v1.0 7 * license, a copy of which has been included with this distribution in the 8 * LICENSE.txt file. 9 */ 10 11 package org.mule.api.routing; 12 13 import org.mule.api.MessagingException; 14 import org.mule.api.MuleMessage; 15 import org.mule.api.MuleSession; 16 17 /** 18 * <code>OutboundRouterCollection</code> is responsible for holding all outbound routers for a service service. 19 */ 20 21 public interface OutboundRouterCollection extends RouterCollection 22 { 23 /** 24 * Prepares one or more events to be dispached by a Message Dispatcher. 25 * 26 * @param message The source Message 27 * @param session The current session 28 * @return a list containing 0 or events to be dispatched 29 * @throws RoutingException If any of the events cannot be created. 30 */ 31 MuleMessage route(MuleMessage message, MuleSession session, boolean synchronous) throws MessagingException; 32 33 /** 34 * Determines if any endpoints have been set on this router. 35 * 36 * @return 37 */ 38 boolean hasEndpoints(); 39 }