MbeansDescriptorsIntrospectionSource (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.tomcat.util.modeler.modules, class: MbeansDescriptorsIntrospectionSource

# Class MbeansDescriptorsIntrospectionSource

java.lang.Object
org.apache.tomcat.util.modeler.modules.ModelerSource
org.apache.tomcat.util.modeler.modules.MbeansDescriptorsIntrospectionSource

public class MbeansDescriptorsIntrospectionSource extends ModelerSource
Source for creating MBean descriptors through introspection.

- ## Field Summary

  ### Fields inherited from class ModelerSource

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MbeansDescriptorsIntrospectionSource()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ManagedBean`
  `createManagedBean(Registry registry, String domain, Class<?> realClass, String type)`
  XXX Find if the 'className' is the name of the MBean or the real class ( I suppose first ) XXX Read (optional) descriptions from a .properties, generated from source XXX Deal with constructors
  `void`
  `execute()`
  Execute the descriptor loading.
  `List<ObjectName>`
  `loadDescriptors(Registry registry, String type, Object source)`
  Load data, returns a list of items.
  `void`
  `setRegistry(Registry reg)`
  Set the registry.
  `void`
  `setSource(Object source)`
  Set the source.
  `void`
  `setType(String type)`
  Used if a single component is loaded

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### MbeansDescriptorsIntrospectionSource

    public MbeansDescriptorsIntrospectionSource()
    Default constructor.

- ## Method Details

  - ### setRegistry

    public void setRegistry(Registry reg)
    Set the registry.
    Parameters:
      `reg` - the registry to set

  - ### setType

    public void setType(String type)
    Used if a single component is loaded
    Parameters:
      `type` - The type

  - ### setSource

    public void setSource(Object source)
    Set the source.
    Parameters:
      `source` - the source to set

  - ### loadDescriptors

    public List<ObjectName> loadDescriptors(Registry registry, String type, Object source) throws Exception
    Description copied from class: `ModelerSource`
    Load data, returns a list of items.
    Specified by:
      `loadDescriptors` in class `ModelerSource`
    Parameters:
      `registry` - The registry
      `type` - The bean registry type
      `source` - Introspected object or some other source
    Returns:
      a list of object names
    Throws:
      `Exception` - Error loading descriptors

  - ### execute

    public void execute() throws Exception
    Execute the descriptor loading.
    Throws:
      `Exception` - if an error occurs

  - ### createManagedBean

    public ManagedBean createManagedBean(Registry registry, String domain, Class<?> realClass, String type)
    XXX Find if the 'className' is the name of the MBean or the real class ( I suppose first ) XXX Read (optional) descriptions from a .properties, generated from source XXX Deal with constructors
    Parameters:
      `registry` - The Bean registry (not used)
      `domain` - The bean domain (not used)
      `realClass` - The class to analyze
      `type` - The bean type
    Returns:
      ManagedBean The create MBean