1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.api.routing; 8 9 import org.mule.api.processor.MessageProcessor; 10 import org.mule.api.routing.filter.Filter; 11 12 /** 13 * Routes the event to <code>MessageProcessor</code>s using a {@link Filter} to 14 * evaluate the event being processed and determine if a given route should be used. 15 * <p> 16 * If the implementation supports the use of a default route then this will be used 17 * to route any events that don't match any other routes. 18 */ 19 public interface SelectiveRouter extends MessageProcessor 20 { 21 void addRoute(MessageProcessor processor, Filter filter); 22 23 void updateRoute(MessageProcessor processor, Filter filter); 24 25 void removeRoute(MessageProcessor processor); 26 27 void setDefaultRoute(MessageProcessor processor); 28 }