Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AbstractCatchAllStrategy |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: AbstractCatchAllStrategy.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
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 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.routing; | |
12 | ||
13 | import org.mule.management.stats.RouterStatistics; | |
14 | import org.mule.umo.endpoint.UMOEndpoint; | |
15 | import org.mule.umo.routing.UMORouterCatchAllStrategy; | |
16 | ||
17 | import org.apache.commons.logging.Log; | |
18 | import org.apache.commons.logging.LogFactory; | |
19 | ||
20 | /** | |
21 | * <code>ForwardingCatchAllStrategy</code> acts as a catch and forward router for | |
22 | * any events not caught by the router this strategy is associated with. Users can | |
23 | * assign an endpoint to this strategy to forward all events to. This is similar to a | |
24 | * dead letter queue in messaging. | |
25 | * | |
26 | * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> | |
27 | * @version $Revision: 7976 $ | |
28 | */ | |
29 | ||
30 | 0 | public abstract class AbstractCatchAllStrategy implements UMORouterCatchAllStrategy |
31 | { | |
32 | /** | |
33 | * logger used by this class | |
34 | */ | |
35 | 0 | protected transient Log logger = LogFactory.getLog(getClass()); |
36 | ||
37 | protected UMOEndpoint endpoint; | |
38 | ||
39 | protected RouterStatistics statistics; | |
40 | ||
41 | public void setEndpoint(UMOEndpoint endpoint) | |
42 | { | |
43 | 0 | this.endpoint = endpoint; |
44 | 0 | } |
45 | ||
46 | public UMOEndpoint getEndpoint() | |
47 | { | |
48 | 0 | return endpoint; |
49 | } | |
50 | ||
51 | public RouterStatistics getStatistics() | |
52 | { | |
53 | 0 | return statistics; |
54 | } | |
55 | ||
56 | public void setStatistics(RouterStatistics statistics) | |
57 | { | |
58 | 0 | this.statistics = statistics; |
59 | 0 | } |
60 | ||
61 | } |