1 /* 2 * $Id: OutboundRouterCollection.java 19191 2010-08-25 21:05:23Z tcarlson $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.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.context.MuleContextAware; 14 import org.mule.api.lifecycle.Disposable; 15 import org.mule.api.lifecycle.Initialisable; 16 17 import java.util.List; 18 19 /** 20 * <code>RouterCollection</code> defines the interface for a MessageRouter that 21 * manages more than one router. A {@link OutboundRouterCatchAllStrategy} can be set 22 * on this router to route unwanted or unfiltered events. If a catch strategy is not 23 * set, the router just returns null. <code>OutboundRouterCollection</code> is 24 * responsible for holding all outbound routers for a service service. 25 */ 26 27 public interface OutboundRouterCollection 28 extends MatchingRouter, RouterStatisticsRecorder, Initialisable, Disposable, MuleContextAware 29 { 30 List<MatchableMessageProcessor> getRoutes(); 31 32 OutboundRouterCatchAllStrategy getCatchAllStrategy(); 33 34 void setCatchAllStrategy(OutboundRouterCatchAllStrategy catchAllStrategy); 35 36 boolean isMatchAll(); 37 38 void setMatchAll(boolean matchAll); 39 40 /** 41 * Determines if any targets have been set on this router. 42 */ 43 boolean hasEndpoints(); 44 }