KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > tck > testmodels > mule > TestCatchAllStrategy


1 /*
2  * $Id: TestCatchAllStrategy.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
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.umo.UMOMessage;
14 import org.mule.umo.UMOSession;
15 import org.mule.umo.endpoint.UMOEndpoint;
16 import org.mule.umo.routing.RoutingException;
17 import org.mule.umo.routing.UMORouterCatchAllStrategy;
18 import org.mule.util.StringMessageUtils;
19
20 /**
21  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
22  * @version $Revision: 3798 $
23  */

24 public class TestCatchAllStrategy implements UMORouterCatchAllStrategy
25 {
26     private UMOEndpoint endpoint;
27
28     public void setEndpoint(UMOEndpoint endpoint)
29     {
30         this.endpoint = endpoint;
31     }
32
33     public UMOEndpoint getEndpoint()
34     {
35         return endpoint;
36     }
37
38     public UMOMessage catchMessage(UMOMessage message, UMOSession session, boolean synchronous)
39         throws RoutingException
40     {
41         System.out.println(StringMessageUtils.getBoilerPlate("Caught an event in the router!", '*', 40));
42         return null;
43     }
44 }
45
Popular Tags