Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
MatchingRouter |
|
| 1.0;1 |
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 | ||
11 | /** | |
12 | * Routes the message to zero or more <code>MatchableMessageProcessor</code>s. Which | |
13 | * route(s) are used used is defined by implementations of this interface which use | |
14 | * the {@link Matchable#isMatch(org.mule.api.MuleMessage)} method of the routers to | |
15 | * determine if a router accept the event or not. | |
16 | * <p> | |
17 | * Different implementations may route to the first match, or to all matches or you | |
18 | * some other strategy. If the implementation supports the use of a default route | |
19 | * then this will be used to route any events that don't match any other routes. | |
20 | */ | |
21 | public interface MatchingRouter extends MessageProcessor | |
22 | { | |
23 | void addRoute(MatchableMessageProcessor matchable); | |
24 | ||
25 | void removeRoute(MatchableMessageProcessor matchable); | |
26 | } |