BaseCatalinaMBean (Apache Tomcat 9.0.120 API Documentation)
Description: declaration: package: org.apache.catalina.mbeans, class: BaseCatalinaMBean

# Class BaseCatalinaMBean<T>

java.lang.Object
org.apache.tomcat.util.modeler.BaseModelMBean
org.apache.catalina.mbeans.BaseCatalinaMBean<T>

Type Parameters:
  `T` - the type of the managed resource

All Implemented Interfaces:
  `DynamicMBean, MBeanRegistration, ModelMBeanNotificationBroadcaster, NotificationBroadcaster`

Direct Known Subclasses:
  `ClassNameMBean, ContainerMBean, ContextEnvironmentMBean, ContextMBean, ContextResourceLinkMBean, ContextResourceMBean, ServiceMBean`

public abstract class BaseCatalinaMBean<T> extends BaseModelMBean
Abstract base class for Catalina MBeans that provides typed access to the managed resource.

- ## Field Summary

  ### Fields inherited from class BaseModelMBean

  `attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseCatalinaMBean()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected T`
  `doGetManagedResource()`
  Returns the managed resource associated with this MBean.
  `protected static Object`
  `newInstance(String type)`
  Creates a new instance of the specified class.

  ### Methods inherited from class BaseModelMBean

  `addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttributes, getClassName, getJmxName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, invoke, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedBean, setManagedResource, toString`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### BaseCatalinaMBean

    public BaseCatalinaMBean()
    Default constructor.

- ## Method Details

  - ### doGetManagedResource

    protected T doGetManagedResource() throws MBeanException
    Returns the managed resource associated with this MBean.
    Returns:
      the managed resource
    Throws:
      `MBeanException` - if the resource cannot be retrieved

  - ### newInstance

    protected static Object newInstance(String type) throws MBeanException
    Creates a new instance of the specified class.
    Parameters:
      `type` - the fully qualified class name
    Returns:
      the new instance
    Throws:
      `MBeanException` - if the instance cannot be created