org.apache.tomcat.util.modeler.modules

## Class MbeansSource

- java.lang.Object
- - org.apache.tomcat.util.modeler.modules.ModelerSource
  - - org.apache.tomcat.util.modeler.modules.MbeansSource

- All Implemented Interfaces:
    MbeansSourceMBean

  Deprecated.
  Unused: Will be removed in Tomcat 8.0.x

      @Deprecated
      public class MbeansSource
      extends ModelerSource
      implements MbeansSourceMBean

  This will create mbeans based on a config file. The format is an extended version of MLET. Classloading. We don't support any explicit classloader tag. A ClassLoader is just an mbean ( it can be the standard MLetMBean or a custom one ). XXX add a special attribute to reference the loader mbean, XXX figure out how to deal with private loaders

- - ### Field Summary

    - ### Fields inherited from class org.apache.tomcat.util.modeler.modules.ModelerSource

      `location, source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MbeansSource()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Deprecated.
    `void` | `execute()` Deprecated.
    `String` | `getLocation()` Deprecated.
    `List<ObjectName>` | `getMBeans()` Deprecated. Return the list of mbeans created by this source.
    `Object` | `getSource()` Deprecated.
    `void` | `init()` Deprecated. Call the init method on all mbeans.
    `void` | `load()` Deprecated. Load the mbeans from the source.
    `List<ObjectName>` | `loadDescriptors(Registry registry, String type, Object source)` Deprecated.
    `void` | `save()` Deprecated. Store the mbeans.
    `void` | `setLocation(String loc)` Deprecated.
    `void` | `setRegistry(Registry reg)` Deprecated.
    `void` | `setSource(Object source)` Deprecated. Set the source to be used to load the mbeans
    `void` | `setType(String type)` Deprecated. Used if a single component is loaded
    `void` | `start()` Deprecated.
    `void` | `stop()` Deprecated.
    `void` | `updateField(ObjectName oname, String name, Object value)` Deprecated. Callback from the BaseMBean to notify that an attribute has changed.

    - ### Methods inherited from class org.apache.tomcat.util.modeler.modules.ModelerSource

      `getInputStream, loadDescriptors, store`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MbeansSource

          public MbeansSource()

      Deprecated.

  - ### Method Detail

    - #### setRegistry

          public void setRegistry(Registry reg)

      Deprecated.

    - #### setLocation

          public void setLocation(String loc)

      Deprecated.

    - #### setType

          public void setType(String type)

      Deprecated.
      Used if a single component is loaded
      Parameters:
        `type` -

    - #### setSource

          public void setSource(Object source)

      Deprecated.
      Description copied from interface: `MbeansSourceMBean`
      Set the source to be used to load the mbeans
      Specified by:
        `setSource` in interface `MbeansSourceMBean`
      Parameters:
        `source` - File or URL

    - #### getSource

          public Object getSource()

      Deprecated.
      Specified by:
        `getSource` in interface `MbeansSourceMBean`

    - #### getLocation

          public String getLocation()

      Deprecated.

    - #### getMBeans

          public List<ObjectName> getMBeans()

      Deprecated.
      Return the list of mbeans created by this source. It can be used to implement runtime services.
      Specified by:
        `getMBeans` in interface `MbeansSourceMBean`
      Returns:
        List of ObjectName

    - #### loadDescriptors

          public List<ObjectName> loadDescriptors(Registry registry,
                                         String type,
                                         Object source)
                                           throws Exception

      Deprecated.
      Specified by:
        `loadDescriptors` in class `ModelerSource`
      Throws:
        `Exception`

    - #### start

          public void start()
                     throws Exception

      Deprecated.
      Throws:
        `Exception`

    - #### stop

          public void stop()
                    throws Exception

      Deprecated.
      Throws:
        `Exception`

    - #### init

          public void init()
                    throws Exception

      Deprecated.
      Description copied from interface: `MbeansSourceMBean`
      Call the init method on all mbeans. Will call load if not done already
      Specified by:
        `init` in interface `MbeansSourceMBean`
      Throws:
        `Exception`

    - #### destroy

          public void destroy()
                       throws Exception

      Deprecated.
      Throws:
        `Exception`

    - #### load

          public void load()
                    throws Exception

      Deprecated.
      Description copied from interface: `MbeansSourceMBean`
      Load the mbeans from the source. Called automatically on init()
      Specified by:
        `load` in interface `MbeansSourceMBean`
      Throws:
        `Exception`

    - #### execute

          public void execute()
                       throws Exception

      Deprecated.
      Throws:
        `Exception`

    - #### updateField

          public void updateField(ObjectName oname,
                         String name,
                         Object value)

      Deprecated.
      Description copied from class: `ModelerSource`
      Callback from the BaseMBean to notify that an attribute has changed. Can be used to implement persistence.
      Overrides:
        `updateField` in class `ModelerSource`

    - #### save

          public void save()

      Deprecated.
      Store the mbeans. XXX add a background thread to store it periodically
      Specified by:
        `save` in interface `MbeansSourceMBean`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.