View Javadoc

1   /*
2    * $Id: ModelService.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
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  {
22      private Model model;
23  
24      public ModelService(Model model)
25      {
26          this.model = model;
27  
28      }
29  
30      public void start() throws MuleException
31      {
32          model.start();
33      }
34  
35      public void stop() throws MuleException
36      {
37          model.stop();
38      }
39  
40  //    public void startComponent(String name) throws MuleException
41  //    {
42  //        model.startComponent(name);
43  //    }
44  //
45  //    public void stopComponent(String name) throws MuleException
46  //    {
47  //        model.stopComponent(name);
48  //    }
49  //
50  //    public void pauseComponent(String name) throws MuleException
51  //    {
52  //        model.pauseComponent(name);
53  //    }
54  //
55  //    public void resumeComponent(String name) throws MuleException
56  //    {
57  //        model.resumeComponent(name);
58  //    }
59  //
60  //    public void unregisterComponent(String name) throws MuleException
61  //    {
62  //        muleContext.getRegistry().unregisterService(name);
63  //        //model.unregisterComponent(model.getDescriptor(name));
64  //    }
65  //
66  //    public boolean isComponentRegistered(String name)
67  //    {
68  //        return model.isComponentRegistered(name);
69  //    }
70  //
71  //    public UMODescriptor getComponentDescriptor(String name)
72  //    {
73  //        return muleContext.getRegistry().lookupService(name);
74  //
75  //        //return model.getDescriptor(name);
76  //    }
77  
78      public String getName()
79      {
80          return model.getName();
81      }
82  
83      public String getType()
84      {
85          return model.getType();
86      }
87  }