| java.lang.Object javax.management.MBeanInfo javax.management.modelmbean.ModelMBeanInfoSupport
ModelMBeanInfoSupport | public class ModelMBeanInfoSupport extends MBeanInfo implements ModelMBeanInfo,Serializable(Code) | | This class represents the meta data for ModelMBeans. Descriptors have been
added on the meta data objects.
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 and operations
exposed via the ModelMBeanInfo for the ModelMBean 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 and operations 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 RuntimeOperationsException must be thrown on every public method. This
allows for wrappering exceptions from distributed communications (RMI, EJB, etc.)
|
Constructor Summary | |
public | ModelMBeanInfoSupport(ModelMBeanInfo mbi) Constructs a ModelMBeanInfoSupport which is a duplicate of the one passed in. | public | ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications) Creates a ModelMBeanInfoSupport with the provided information, but the
descriptor is a default. | public | ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor mbeandescriptor) Creates a ModelMBeanInfoSupport with the provided information
Parameters: className - classname of ModelMBeanInfo Parameters: description - human readable description of the ModelMBean Parameters: attributes - array of ModelMBeanAttributeInfo objects which have descriptors Parameters: constructors - array of ModelMBeanConstructorInfo objects which have descriptor Parameters: operations - array of ModelMBeanOperationInfo objects which have descriptor Parameters: notifications - array of ModelMBeanNotificationInfo objects which have descriptor Parameters: mbeandescriptor - the descriptor to be used as the MBeanDescriptorcontaining mbean wide policy. |
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() Returns the name of the Java class of the MBean described by this ModelMBeanInfo. | public ModelMBeanConstructorInfo | getConstructor(String inName) Returns a ModelMBeanConstructorInfo requested by name.
Parameters: String - inName The name of the ModelMBeanConstructorInfo to get. | public MBeanConstructorInfo[] | getConstructors() Gets the constructors info of the ModelMBean targetted object. | public String | getDescription() Returns a human readable description of the MBean. | public Descriptor | getDescriptor(String inDescriptorName) Returns a Descriptor requested by name
Parameters: inDescriptorName - The name of the descriptor. | 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). |
ModelMBeanInfoSupport | public ModelMBeanInfoSupport(ModelMBeanInfo mbi)(Code) | | Constructs a ModelMBeanInfoSupport which is a duplicate of the one passed in.
Parameters: mbi - the ModelMBeanInfo instance from which the ModelMBeanInfobeing created is initialized |
ModelMBeanInfoSupport | public ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)(Code) | | Creates a ModelMBeanInfoSupport with the provided information, but the
descriptor is a default. The default descriptor is: name=mbeanName,
descriptorType=mbean, displayName=this.getClassName(),
persistPolicy=never, log=F,export=F,visiblity=1
Parameters: className - classname of ModelMBeanInfo Parameters: description - human readable description of the ModelMBean Parameters: attributes - array of ModelMBeanAttributeInfo objects which have descriptors Parameters: constructors - array of ModelMBeanConstructorInfo objects which have descriptor Parameters: operations - array of ModelMBeanOperationInfo objects which have descriptor Parameters: notifications - array of ModelMBeanNotificationInfo objects which have descriptor |
ModelMBeanInfoSupport | public ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor mbeandescriptor)(Code) | | Creates a ModelMBeanInfoSupport with the provided information
Parameters: className - classname of ModelMBeanInfo Parameters: description - human readable description of the ModelMBean Parameters: attributes - array of ModelMBeanAttributeInfo objects which have descriptors Parameters: constructors - array of ModelMBeanConstructorInfo objects which have descriptor Parameters: operations - array of ModelMBeanOperationInfo objects which have descriptor Parameters: notifications - array of ModelMBeanNotificationInfo objects which have descriptor Parameters: mbeandescriptor - the descriptor to be used as the MBeanDescriptorcontaining mbean wide policy. If the descriptor is invalidor null, a default descriptor will be constructed.The default descriptor is:name=mbeanName,descriptorType=mbean,displayName=this.getClassName(),persistPolicy=never,log=F,export=F,visiblity=1.If the descriptor does not contain all these fields,they will be added with these default values. |
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 ModelMBeanAttributeInfo objcts.
The array of MBeanAttributeInfo objects are returned aftergetting the attributes info of ModelMBean targetted object |
getClassName | public String getClassName()(Code) | | Returns the name of the Java class of the MBean described by this ModelMBeanInfo.
the name of the Java class of the MBean described by this ModelMBeanInfo. |
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 ModelMBean targetted object. |
getDescription | public String getDescription()(Code) | | Returns a human readable description of the MBean. Optional.
a human readable description of the MBean. Optional. |
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 withthe same name and descriptorType. If a descriptor is notfound, 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 |
|
|