View Javadoc
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.tck.testmodels.mule;
8   
9   import org.mule.api.MuleEvent;
10  import org.mule.api.endpoint.OutboundEndpoint;
11  import org.mule.api.routing.OutboundRouterCatchAllStrategy;
12  import org.mule.api.routing.RoutingException;
13  import org.mule.util.StringMessageUtils;
14  
15  public class TestCatchAllStrategy implements OutboundRouterCatchAllStrategy
16  {
17      private OutboundEndpoint endpoint;
18  
19      private String testProperty;
20  
21      public void setEndpoint(OutboundEndpoint endpoint)
22      {
23          this.endpoint = endpoint;
24      }
25  
26      public OutboundEndpoint getEndpoint()
27      {
28          return endpoint;
29      }
30  
31      public MuleEvent process(MuleEvent event)
32          throws RoutingException
33      {
34          System.out.println(StringMessageUtils.getBoilerPlate("Caught an event in the router!", '*', 40));
35          return null;
36      }
37  
38      public String getTestProperty()
39      {
40          return testProperty;
41      }
42  
43      public void setTestProperty(String testProperty)
44      {
45          this.testProperty = testProperty;
46      }
47  }