| javax.management.modelmbean.ModelMBeanInfo
ModelMBeanInfo | public interface ModelMBeanInfo (Code) | | ModelMBeanInfo interface is used to expose its metadat of management attributes,
operations and notifications for use by the management system.
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.)
|
Method Summary | |
public Object | clone() To clone this ModelMBeanInfo implementation object as
ModelMBeanInfoSupport object. | public ModelMBeanAttributeInfo | getAttribute(String inName) Returns a ModelMBeanAttributeInfo requested by name.
Parameters: inName - The name of the ModelMBeanAttributeInfo to get. | public MBeanAttributeInfo[] | getAttributes() Gets the attributes info of the ModelMBean targetted object. | public String | getClassName() | public MBeanConstructorInfo[] | getConstructors() Gets the constructors info of the ModelMBean targetted object. | public String | getDescription() | public Descriptor | getDescriptor(String inDescriptorName, String inDescriptorType) Returns a Descriptor requested by name and descriptorType.
Parameters: inDescriptorName - The name of the descriptor. Parameters: inDescriptorType - The type of the descriptor being requested.If this is null then all types are searched. | public Descriptor[] | getDescriptors(String inDescriptorType) 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 setfor the descriptor to be returned. | public Descriptor | getMBeanDescriptor() Returns a MBean's descriptor. | public ModelMBeanNotificationInfo | getNotification(String inName) Returns a ModelMBeanNotificationInfo requested by name.
Parameters: inName - The name of the ModelMBeanNotificationInfo to get. | public MBeanNotificationInfo[] | getNotifications() Gets the notifications info emitted by the ModelMBean targetted object. | public ModelMBeanOperationInfo | getOperation(String inName) Returns a ModelMBeanOperationInfo requested by name.
Parameters: inName - The name of the ModelMBeanOperationInfo to get. | public MBeanOperationInfo[] | getOperations() Gets the operations info of the ModelMBean targetted object. | public void | setDescriptor(Descriptor inDescriptor, String inDescriptorType) Adds or replaces descriptors in all the info arrays for the ModelMBean.
Parameters: inDescriptor - The descriptor to be set in the ModelMBean.It must NOT be null. | public void | setDescriptors(Descriptor[] inDescriptors) Adds or replaces descriptors in the ModelMBeanInfo.
Parameters: inDescriptors - The descriptors to be set in the ModelMBeanInfo.Null elements of the list will be ignored. | public void | setMBeanDescriptor(Descriptor inDescriptor) Sets the ModelMBean's descriptor (fully replace). |
clone | public Object clone()(Code) | | To clone this ModelMBeanInfo implementation object as
ModelMBeanInfoSupport object.
The duplicate copy of the object |
getAttributes | public MBeanAttributeInfo[] getAttributes()(Code) | | Gets the attributes info of the ModelMBean targetted object. The return
object will be a array of MBeanAttributeInfo objects
The array of MBeanAttributeInfo objects are returned after gettingthe attributes info of the ModelMBean targetted object |
getClassName | public String getClassName()(Code) | | Gets the className of the ModelMBean
The class name in string format |
getConstructors | public MBeanConstructorInfo[] getConstructors()(Code) | | Gets the constructors info of the ModelMBean targetted object.
The return object will be a array of ModelMBeanConstructorInfo objects.
The array of MBeanConstructorInfo objects are returned aftergetting the constructors info of the ModelMBean targetted object. |
getDescription | public String getDescription()(Code) | | Gets the description of this ModelMBean
The description of the ModelMBean in string format |
getDescriptor | public Descriptor getDescriptor(String inDescriptorName, String inDescriptorType) throws MBeanException, RuntimeOperationsException(Code) | | Returns a Descriptor requested by name and descriptorType.
Parameters: inDescriptorName - The name of the descriptor. Parameters: inDescriptorType - The type of the descriptor being requested.If this is null then all types are searched. Valid typesare 'attribute', 'constructor', 'operation', and'notification'. This value must be equal to the'descriptorType' field in the descriptor that is returned. Descriptor containing the descriptor for the ModelMBean with thesame name and descriptorType. If a descriptor is not found,null is returned. exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps exceptions for invalidinput 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 setfor the descriptor to 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.
The MBeanDescriptor exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps another exception |
getNotifications | public MBeanNotificationInfo[] getNotifications()(Code) | | Gets the notifications info emitted by the ModelMBean targetted object.
The return object will be a array of ModelMBeanNotificationInfo objects.
The array of MBeanNotificationInfo objects are returned aftergetting the notifications info of the ModelMBean targetted object. |
getOperations | public MBeanOperationInfo[] getOperations()(Code) | | Gets the operations info of the ModelMBean targetted object. The return
object will be a array of ModelMBeanOperationInfo objects.
The array of MBeanOperationInfo objects are returned aftergetting the operations info of the ModelMBean targetted object. |
setDescriptor | public void setDescriptor(Descriptor inDescriptor, String inDescriptorType) throws MBeanException, RuntimeOperationsException(Code) | | Adds or replaces descriptors in all the info arrays for the ModelMBean.
Parameters: inDescriptor - The descriptor to be set in the ModelMBean.It must NOT be null. All descriptors must have name anddescriptorType fields. Parameters: inDescriptorType - The type of the descriptor being set. If thisis null then the descriptorType field in the descriptoris used. If specified this value must be set in thedescriptorType field for the descriptor to be returned.Must be "mbean","attribute", "operation", "constructor",or "notification". exception: RuntimeOperationsException - Wraps exceptions for illegalor 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.Null elements of the list will be ignored. All descriptorsmust have name and descriptorType fields. exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps exceptions for illegalor 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.
Parameters: inDescriptor - This descriptor contains metadata about the MBeanand default policies for persistence and caching forthe entire MBean. exception: MBeanException - Wraps another exception exception: RuntimeOperationsException - Wraps another exception |
|
|