1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.management.mbeans; |
12 | |
|
13 | |
import org.mule.umo.UMOException; |
14 | |
import org.mule.umo.lifecycle.InitialisationException; |
15 | |
import org.mule.umo.provider.UMOConnector; |
16 | |
import org.mule.util.ObjectNameHelper; |
17 | |
|
18 | |
import java.beans.ExceptionListener; |
19 | |
|
20 | |
public class ConnectorService implements ConnectorServiceMBean |
21 | |
{ |
22 | |
private final UMOConnector connector; |
23 | |
private final String name; |
24 | |
|
25 | |
public ConnectorService(final UMOConnector connector) |
26 | 0 | { |
27 | 0 | this.connector = connector; |
28 | 0 | name = ObjectNameHelper.getConnectorName(connector); |
29 | 0 | } |
30 | |
|
31 | |
public boolean isStarted() |
32 | |
{ |
33 | 0 | return connector.isStarted(); |
34 | |
} |
35 | |
|
36 | |
public boolean isDisposed() |
37 | |
{ |
38 | 0 | return connector.isDisposed(); |
39 | |
} |
40 | |
|
41 | |
public boolean isDisposing() |
42 | |
{ |
43 | 0 | return connector.isDisposing(); |
44 | |
} |
45 | |
|
46 | |
public String getName() |
47 | |
{ |
48 | 0 | return name; |
49 | |
} |
50 | |
|
51 | |
public String getProtocol() |
52 | |
{ |
53 | 0 | return connector.getProtocol(); |
54 | |
} |
55 | |
|
56 | |
public ExceptionListener getExceptionListener() |
57 | |
{ |
58 | 0 | return connector.getExceptionListener(); |
59 | |
} |
60 | |
|
61 | |
public void startConnector() throws UMOException |
62 | |
{ |
63 | 0 | connector.startConnector(); |
64 | 0 | } |
65 | |
|
66 | |
public void stopConnector() throws UMOException |
67 | |
{ |
68 | 0 | connector.stopConnector(); |
69 | 0 | } |
70 | |
|
71 | |
public void dispose() |
72 | |
{ |
73 | 0 | connector.dispose(); |
74 | 0 | } |
75 | |
|
76 | |
public void initialise() throws InitialisationException |
77 | |
{ |
78 | 0 | connector.initialise(); |
79 | 0 | } |
80 | |
|
81 | |
} |