01: /*
02: * $Id: ModelService.java 11234 2008-03-06 23:44:34Z tcarlson $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.module.management.mbean;
12:
13: import org.mule.api.MuleException;
14: import org.mule.api.model.Model;
15:
16: /**
17: * <code>ModelService</code> exposes service information and actions on the Mule
18: * Model.
19: */
20: public class ModelService implements ModelServiceMBean {
21: private Model model;
22:
23: public ModelService(Model model) {
24: this .model = model;
25:
26: }
27:
28: public void start() throws MuleException {
29: model.start();
30: }
31:
32: public void stop() throws MuleException {
33: model.stop();
34: }
35:
36: // public void startComponent(String name) throws MuleException
37: // {
38: // model.startComponent(name);
39: // }
40: //
41: // public void stopComponent(String name) throws MuleException
42: // {
43: // model.stopComponent(name);
44: // }
45: //
46: // public void pauseComponent(String name) throws MuleException
47: // {
48: // model.pauseComponent(name);
49: // }
50: //
51: // public void resumeComponent(String name) throws MuleException
52: // {
53: // model.resumeComponent(name);
54: // }
55: //
56: // public void unregisterComponent(String name) throws MuleException
57: // {
58: // RegistryContext.getRegistry().unregisterService(name);
59: // //model.unregisterComponent(model.getDescriptor(name));
60: // }
61: //
62: // public boolean isComponentRegistered(String name)
63: // {
64: // return model.isComponentRegistered(name);
65: // }
66: //
67: // public UMODescriptor getComponentDescriptor(String name)
68: // {
69: // return RegistryContext.getRegistry().lookupService(name);
70: //
71: // //return model.getDescriptor(name);
72: // }
73:
74: public String getName() {
75: return model.getName();
76: }
77:
78: public String getType() {
79: return model.getType();
80: }
81: }
|