1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.routing; |
11 | |
|
12 | |
import org.mule.api.MuleContext; |
13 | |
import org.mule.api.context.MuleContextAware; |
14 | |
import org.mule.api.lifecycle.InitialisationException; |
15 | |
import org.mule.api.routing.Router; |
16 | |
import org.mule.management.stats.RouterStatistics; |
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | 452 | public abstract class AbstractRouter implements Router, MuleContextAware |
24 | |
{ |
25 | |
|
26 | |
private RouterStatistics routerStatistics; |
27 | |
|
28 | |
protected MuleContext muleContext; |
29 | |
|
30 | |
public void initialise() throws InitialisationException |
31 | |
{ |
32 | |
|
33 | 2 | } |
34 | |
|
35 | |
public void dispose() |
36 | |
{ |
37 | |
|
38 | 0 | } |
39 | |
|
40 | |
public void setMuleContext(MuleContext context) |
41 | |
{ |
42 | 12 | this.muleContext = context; |
43 | 12 | } |
44 | |
|
45 | |
public MuleContext getMuleContext() |
46 | |
{ |
47 | 22 | return muleContext; |
48 | |
} |
49 | |
|
50 | |
public void setRouterStatistics(RouterStatistics stats) |
51 | |
{ |
52 | 400 | this.routerStatistics = stats; |
53 | 400 | } |
54 | |
|
55 | |
public RouterStatistics getRouterStatistics() |
56 | |
{ |
57 | 106 | return routerStatistics; |
58 | |
} |
59 | |
} |