KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > routing > AbstractCatchAllStrategy


1 /*
2  * $Id: AbstractCatchAllStrategy.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.routing;
12
13 import org.apache.commons.logging.Log;
14 import org.apache.commons.logging.LogFactory;
15 import org.mule.management.stats.RouterStatistics;
16 import org.mule.umo.endpoint.UMOEndpoint;
17 import org.mule.umo.routing.UMORouterCatchAllStrategy;
18
19 /**
20  * <code>ForwardingCatchAllStrategy</code> acts as a catch and forward router for
21  * any events not caught by the router this strategy is associated with. Users can
22  * assign an endpoint to this strategy to forward all events to. This is similar to a
23  * dead letter queue in messaging.
24  *
25  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
26  * @version $Revision: 3798 $
27  */

28
29 public abstract class AbstractCatchAllStrategy implements UMORouterCatchAllStrategy
30 {
31     /**
32      * logger used by this class
33      */

34     protected transient Log logger = LogFactory.getLog(getClass());
35
36     protected UMOEndpoint endpoint;
37
38     protected RouterStatistics statistics;
39
40     public void setEndpoint(UMOEndpoint endpoint)
41     {
42         this.endpoint = endpoint;
43     }
44
45     public UMOEndpoint getEndpoint()
46     {
47         return endpoint;
48     }
49
50     public RouterStatistics getStatistics()
51     {
52         return statistics;
53     }
54
55     public void setStatistics(RouterStatistics statistics)
56     {
57         this.statistics = statistics;
58     }
59
60 }
61
Popular Tags