Package org.apache.catalina.mbeans
Class MBeanUtils
- java.lang.Object
- 
- org.apache.catalina.mbeans.MBeanUtils
 
- 
 public class MBeanUtils extends java.lang.ObjectPublic utility methods in support of the server side MBeans implementation.- Author:
- Craig R. McClanahan, Amy Roh
 
- 
- 
Constructor SummaryConstructors Constructor Description MBeanUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.management.DynamicMBeancreateMBean(ContextEnvironment environment)Create, register, and return an MBean for thisContextEnvironmentobject.static javax.management.DynamicMBeancreateMBean(ContextResource resource)Create, register, and return an MBean for thisContextResourceobject.static javax.management.DynamicMBeancreateMBean(ContextResourceLink resourceLink)Create, register, and return an MBean for thisContextResourceLinkobject.static javax.management.ObjectNamecreateObjectName(java.lang.String domain, ContextEnvironment environment)Create anObjectNamefor thisServiceobject.static javax.management.ObjectNamecreateObjectName(java.lang.String domain, ContextResource resource)Create anObjectNamefor thisContextResourceobject.static javax.management.ObjectNamecreateObjectName(java.lang.String domain, ContextResourceLink resourceLink)Create anObjectNamefor thisContextResourceLinkobject.static RegistrycreateRegistry()Create and configure (if necessary) and return the registry of managed object descriptions.static javax.management.MBeanServercreateServer()Create and configure (if necessary) and return theMBeanServerwith which we will be registering ourDynamicMBeanimplementations.static voiddestroyMBean(ContextEnvironment environment)Deregister the MBean for thisContextEnvironmentobject.static voiddestroyMBean(ContextResource resource)Deregister the MBean for thisContextResourceobject.static voiddestroyMBean(ContextResourceLink resourceLink)Deregister the MBean for thisContextResourceLinkobject.
 
- 
- 
- 
Method Detail- 
createMBeanpublic static javax.management.DynamicMBean createMBean(ContextEnvironment environment) throws java.lang.Exception Create, register, and return an MBean for thisContextEnvironmentobject.- Parameters:
- environment- The ContextEnvironment to be managed
- Returns:
- a new MBean
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createMBeanpublic static javax.management.DynamicMBean createMBean(ContextResource resource) throws java.lang.Exception Create, register, and return an MBean for thisContextResourceobject.- Parameters:
- resource- The ContextResource to be managed
- Returns:
- a new MBean
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createMBeanpublic static javax.management.DynamicMBean createMBean(ContextResourceLink resourceLink) throws java.lang.Exception Create, register, and return an MBean for thisContextResourceLinkobject.- Parameters:
- resourceLink- The ContextResourceLink to be managed
- Returns:
- a new MBean
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createObjectNamepublic static javax.management.ObjectName createObjectName(java.lang.String domain, ContextEnvironment environment) throws javax.management.MalformedObjectNameExceptionCreate anObjectNamefor thisServiceobject.- Parameters:
- domain- Domain in which this name is to be created
- environment- The ContextEnvironment to be named
- Returns:
- a new object name
- Throws:
- javax.management.MalformedObjectNameException- if a name cannot be created
 
 - 
createObjectNamepublic static javax.management.ObjectName createObjectName(java.lang.String domain, ContextResource resource) throws javax.management.MalformedObjectNameExceptionCreate anObjectNamefor thisContextResourceobject.- Parameters:
- domain- Domain in which this name is to be created
- resource- The ContextResource to be named
- Returns:
- a new object name
- Throws:
- javax.management.MalformedObjectNameException- if a name cannot be created
 
 - 
createObjectNamepublic static javax.management.ObjectName createObjectName(java.lang.String domain, ContextResourceLink resourceLink) throws javax.management.MalformedObjectNameExceptionCreate anObjectNamefor thisContextResourceLinkobject.- Parameters:
- domain- Domain in which this name is to be created
- resourceLink- The ContextResourceLink to be named
- Returns:
- a new object name
- Throws:
- javax.management.MalformedObjectNameException- if a name cannot be created
 
 - 
createRegistrypublic static Registry createRegistry() Create and configure (if necessary) and return the registry of managed object descriptions.- Returns:
- the singleton registry
 
 - 
createServerpublic static javax.management.MBeanServer createServer() Create and configure (if necessary) and return theMBeanServerwith which we will be registering ourDynamicMBeanimplementations.- Returns:
- the singleton MBean server
 
 - 
destroyMBeanpublic static void destroyMBean(ContextEnvironment environment) throws java.lang.Exception Deregister the MBean for thisContextEnvironmentobject.- Parameters:
- environment- The ContextEnvironment to be managed
- Throws:
- java.lang.Exception- if an MBean cannot be deregistered
 
 - 
destroyMBeanpublic static void destroyMBean(ContextResource resource) throws java.lang.Exception Deregister the MBean for thisContextResourceobject.- Parameters:
- resource- The ContextResource to be managed
- Throws:
- java.lang.Exception- if an MBean cannot be deregistered
 
 - 
destroyMBeanpublic static void destroyMBean(ContextResourceLink resourceLink) throws java.lang.Exception Deregister the MBean for thisContextResourceLinkobject.- Parameters:
- resourceLink- The ContextResourceLink to be managed
- Throws:
- java.lang.Exception- if an MBean cannot be deregistered
 
 
- 
 
-