KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > management > mbeans > ConnectorService


1 /*
2  * $Id: ConnectorService.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.management.mbeans;
12
13 import java.beans.ExceptionListener JavaDoc;
14
15 import org.mule.umo.UMOException;
16 import org.mule.umo.lifecycle.InitialisationException;
17 import org.mule.umo.provider.UMOConnector;
18 import org.mule.umo.provider.UMOMessageDispatcherFactory;
19 import org.mule.util.ObjectNameHelper;
20
21 /**
22  * @author <a HREF="mailto:aperepel@gmail.com">Andrew Perepelytsya</a> $Id:
23  * ConnectorService.java 3183 2006-09-23 09:27:47Z rossmason $
24  */

25 public class ConnectorService implements ConnectorServiceMBean
26 {
27     private UMOConnector connector;
28     private String JavaDoc name;
29
30     public ConnectorService(final UMOConnector connector)
31     {
32         this.connector = connector;
33         name = ObjectNameHelper.getConnectorName(connector);
34     }
35
36     public boolean isStarted()
37     {
38         return connector.isStarted();
39     }
40
41     public boolean isDisposed()
42     {
43         return connector.isDisposed();
44     }
45
46     public boolean isDisposing()
47     {
48         return connector.isDisposing();
49     }
50
51     public String JavaDoc getName()
52     {
53         return name;
54     }
55
56     public String JavaDoc getProtocol()
57     {
58         return connector.getProtocol();
59     }
60
61     public ExceptionListener JavaDoc getExceptionListener()
62     {
63         return connector.getExceptionListener();
64     }
65
66     public UMOMessageDispatcherFactory getDispatcherFactory()
67     {
68         return connector.getDispatcherFactory();
69     }
70
71     public void startConnector() throws UMOException
72     {
73         connector.startConnector();
74     }
75
76     public void stopConnector() throws UMOException
77     {
78         connector.stopConnector();
79     }
80
81     public void dispose()
82     {
83         connector.dispose();
84     }
85
86     public void initialise() throws InitialisationException
87     {
88         connector.initialise();
89     }
90 }
91
Popular Tags