1 /* 2 * $Id: OutboundRouterCollection.java 21195 2011-02-08 02:25:55Z mike.schilling $ 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 import org.mule.management.stats.RouterStatistics; 17 18 import java.util.List; 19 20 /** 21 * <code>RouterCollection</code> defines the interface for a MessageRouter that 22 * manages more than one router. A {@link OutboundRouterCatchAllStrategy} can be set 23 * on this router to route unwanted or unfiltered events. If a catch strategy is not 24 * set, the router just returns null. <code>OutboundRouterCollection</code> is 25 * responsible for holding all outbound routers for a service service. 26 */ 27 28 public interface OutboundRouterCollection 29 extends MatchingRouter, RouterStatisticsRecorder, Initialisable, Disposable, MuleContextAware 30 { 31 List<MatchableMessageProcessor> getRoutes(); 32 33 OutboundRouterCatchAllStrategy getCatchAllStrategy(); 34 35 void setCatchAllStrategy(OutboundRouterCatchAllStrategy catchAllStrategy); 36 37 boolean isMatchAll(); 38 39 void setMatchAll(boolean matchAll); 40 41 /** 42 * Determines if any targets have been set on this router. 43 */ 44 boolean hasEndpoints(); 45 46 RouterStatistics getRouterStatistics(); 47 }