01: /*
02: * $Id: AbstractCatchAllStrategy.java 10961 2008-02-22 19:01:02Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.routing;
12:
13: import org.mule.api.endpoint.OutboundEndpoint;
14: import org.mule.api.routing.RouterCatchAllStrategy;
15: import org.mule.management.stats.RouterStatistics;
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 any
22: * events not caught by the router this strategy is associated with. Users can assign an
23: * endpoint to this strategy to forward all events to. This is similar to a dead letter
24: * queue in messaging.
25: */
26:
27: public abstract class AbstractCatchAllStrategy implements
28: RouterCatchAllStrategy {
29: /**
30: * logger used by this class
31: */
32: protected transient Log logger = LogFactory.getLog(getClass());
33:
34: protected OutboundEndpoint endpoint;
35:
36: protected RouterStatistics statistics;
37:
38: public void setEndpoint(OutboundEndpoint endpoint) {
39: this .endpoint = endpoint;
40: }
41:
42: public OutboundEndpoint getEndpoint() {
43: return endpoint;
44: }
45:
46: public RouterStatistics getStatistics() {
47: return statistics;
48: }
49:
50: public void setStatistics(RouterStatistics statistics) {
51: this.statistics = statistics;
52: }
53:
54: }
|