1 10 11 package org.mule.management.mbeans; 12 13 import org.mule.MuleManager; 14 import org.mule.umo.UMODescriptor; 15 import org.mule.umo.UMOException; 16 import org.mule.umo.model.UMOModel; 17 18 25 public class ModelService implements ModelServiceMBean 26 { 27 private UMOModel model; 28 29 public ModelService() 30 { 31 model = MuleManager.getInstance().getModel(); 32 33 } 34 35 public void start() throws UMOException 36 { 37 model.start(); 38 } 39 40 public void stop() throws UMOException 41 { 42 model.stop(); 43 } 44 45 public void startComponent(String name) throws UMOException 46 { 47 model.startComponent(name); 48 } 49 50 public void stopComponent(String name) throws UMOException 51 { 52 model.stopComponent(name); 53 } 54 55 public void pauseComponent(String name) throws UMOException 56 { 57 model.pauseComponent(name); 58 } 59 60 public void resumeComponent(String name) throws UMOException 61 { 62 model.resumeComponent(name); 63 } 64 65 public void unregisterComponent(String name) throws UMOException 66 { 67 model.unregisterComponent(model.getDescriptor(name)); 68 } 69 70 public boolean isComponentRegistered(String name) 71 { 72 return model.isComponentRegistered(name); 73 } 74 75 public UMODescriptor getComponentDescriptor(String name) 76 { 77 return model.getDescriptor(name); 78 } 79 80 public String getName() 81 { 82 return model.getName(); 83 } 84 85 public String getType() 86 { 87 return model.getType(); 88 } 89 } 90 | Popular Tags |