| javax.management.modelmbean.ModelMBeanInfo
All known Subclasses: javax.management.modelmbean.ModelMBeanInfoSupport,
ModelMBeanInfo | public interface ModelMBeanInfo (Code) | | This interface is the implemented by the ModelMBeanInfo for every ModelMBean. An implementation of this interface
must be shipped with every JMX Agent.
Java resources wishing to be manageable instatiate the ModelMBean using the MBeanServer's
createMBean method. The resource then sets the ModelMBeanInfo and Descriptors for the ModelMBean
instance. The attributes, operations, and notifications exposed via the ModelMBeanInfo for the
ModelMBean comprise the management interface and are accessible
from Mbeans, connectors/adapters like other MBeans. Through the Descriptors, values and methods in
the managed application can be defined and mapped to attributes and operations of the ModelMBean.
This mapping can be defined during development in a file or dynamically and
programmatically at runtime.
Every ModelMBean which is instantiated in the MBeanServer becomes manageable:
its attributes, operations, and notifications
become remotely accessible through the connectors/adaptors connected to that MBeanServer.
A Java object cannot be registered in the MBeanServer unless it is a JMX compliant MBean.
By instantiating a ModelMBean, resources are guaranteed that the MBean is valid.
MBeanException and RuntimeOperatiosException must be thrown on every public method. This allows
for wrappering exceptions from distributed communications (RMI, EJB, etc.)
author: Young Yang |
getDescriptor | public Descriptor getDescriptor(String descriptorName, String descriptorType) throws MBeanException, RuntimeOperationsException(Code) | | returns a Descriptor requested by name and descriptorType.
Parameters: descriptorName - The name of the descriptor. Parameters: descriptorType - The type of the descriptor being requested. If this is nullthen all types are searched. Valid types are 'attribute', 'constructor', 'operation',and 'notification'. This value must be equal to the 'descriptorType' field in thedescriptor that is returned. Descriptor containing the descriptor for the ModelMBean with the same name and descriptorType.If a descriptor is not found, null is returned. exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps exceptions for invalid input name or type. |
getDescriptors | public Descriptor[] getDescriptors(String inDescriptorType) throws MBeanException, RuntimeOperationsException(Code) | | returns a Descriptor array consisting of all
Descriptors for the ModelMBeanInfo including the MBean Descriptor, attribute Descriptors,
operation Descriptors, constructor Descriptors, and notification Descriptors.
Parameters: inDescriptorType - value of descriptorType field that must be set for the descriptorto be returned. Must be "mbean", "attribute", "operation", "constructor", or "notification".If it is null then all types will be returned. Descriptor array containing all descriptors for the ModelMBean exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps another exception |
getMBeanDescriptor | public Descriptor getMBeanDescriptor() throws MBeanException, RuntimeOperationsException(Code) | | returns a MBean's descriptor. This descriptor contains
metadata about the MBean and default policies for persistence and caching for the entire MBean.
Policies may be overridden by descriptors associated with attribute, constructors, or operations
with the same fieldNames.
exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps another exception |
setDescriptor | public void setDescriptor(Descriptor descriptor, String descriptorType) throws MBeanException, RuntimeOperationsException(Code) | | adds or replaces descriptors in all the info arrays for the ModelMBean.
Parameters: descriptor - The descriptor to be set in the ModelMBean. It must NOT be null.All descriptors must have name and descriptorType fields. Parameters: descriptorType - The type of the descriptor being set. If this is nullthen the descriptorType field in the descriptor is used. If specifiedthis value must be set in the descriptorType field for the descriptorto be returned. Must be "mbean","attribute", "operation", "constructor", or "notification". exception: RuntimeOperationsException - Wraps exceptions for illegal or null arguments |
setDescriptors | public void setDescriptors(Descriptor[] inDescriptors) throws MBeanException, RuntimeOperationsException(Code) | | adds or replaces descriptors in the ModelMBeanInfo.
Parameters: inDescriptors - The descriptors to be set in the ModelMBeanInfo. Nullelements of the list will be ignored. All descriptors must have name and descriptorType fields. exception: RuntimeOperationsException - Wraps exceptions for illegal or null arguments |
setMBeanDescriptor | public void setMBeanDescriptor(Descriptor inDescriptor) throws MBeanException, RuntimeOperationsException(Code) | | sets the ModelMBean's descriptor (fully replace).
This descriptor contains
metadata about the MBean and default policies for persistence and caching for the
entire MBean.
Policies may be overridden by descriptors associated with attribute, constructors, or operations
with the same fieldNames.
This operation does a complete replacement of the descriptor, no merging is done.
The default MBeanDescriptor is
exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps another exception |
|
|