1 10 11 package org.mule.management.mbeans; 12 13 import java.beans.ExceptionListener ; 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 25 public class ConnectorService implements ConnectorServiceMBean 26 { 27 private UMOConnector connector; 28 private String 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 getName() 52 { 53 return name; 54 } 55 56 public String getProtocol() 57 { 58 return connector.getProtocol(); 59 } 60 61 public ExceptionListener 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 |