1
2
3
4
5
6
7
8
9
10
11 package org.mule.tck.testmodels.mule;
12
13 import org.mule.api.MuleMessage;
14 import org.mule.api.MuleSession;
15 import org.mule.api.endpoint.OutboundEndpoint;
16 import org.mule.api.routing.RouterCatchAllStrategy;
17 import org.mule.api.routing.RoutingException;
18 import org.mule.util.StringMessageUtils;
19
20 public class TestCatchAllStrategy implements RouterCatchAllStrategy
21 {
22 private OutboundEndpoint endpoint;
23
24 public void setEndpoint(OutboundEndpoint endpoint)
25 {
26 this.endpoint = endpoint;
27 }
28
29 public OutboundEndpoint getEndpoint()
30 {
31 return endpoint;
32 }
33
34 public MuleMessage catchMessage(MuleMessage message, MuleSession session, boolean synchronous)
35 throws RoutingException
36 {
37 System.out.println(StringMessageUtils.getBoilerPlate("Caught an event in the router!", '*', 40));
38 return null;
39 }
40 }