View Javadoc

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