| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class ModelMBeanInfoSupport extends MBeanInfo implements ModelMBeanInfo
This class represents the meta data for ModelMBeans. Descriptors have been added on the meta data objects.
Java resources wishing to be manageable instantiate 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/adaptors 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 wrapping exceptions from distributed communications (RMI, EJB, etc.)
The serialVersionUID of this class is
-1935722590756516193L
.
Constructor Summary | |
---|---|
Constructs a ModelMBeanInfoSupport which is a duplicate of the given ModelMBeanInfo. |
|
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. |
|
ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor mbeandescriptor) Creates a ModelMBeanInfoSupport with the provided information and the descriptor given in parameter. |
Method Summary | |
---|---|
Object |
clone() Returns a shallow clone of this instance. |
ModelMBeanAttributeInfo |
getAttribute(String inName) |
ModelMBeanConstructorInfo |
getConstructor(String inName) Returns the ModelMBeanConstructorInfo requested by name. |
Descriptor |
Get the descriptor of this MBeanInfo. |
Descriptor |
getDescriptor(String inDescriptorName) Returns a Descriptor requested by name. |
Descriptor |
getDescriptor(String inDescriptorName, String inDescriptorType) |
Descriptor[] |
getDescriptors(String inDescriptorType) |
Descriptor |
|
ModelMBeanNotificationInfo |
getNotification(String inName) |
ModelMBeanOperationInfo |
getOperation(String inName) |
void |
setDescriptor(Descriptor inDescriptor, String inDescriptorType) |
void |
setDescriptors(Descriptor[] inDescriptors) |
void |
setMBeanDescriptor(Descriptor inMBeanDescriptor) |
Methods inherited from class javax.management.MBeanInfo |
---|
clone, equals, getAttributes, getClassName, getConstructors, getDescription, getDescriptor, getNotifications, getOperations, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelMBeanInfoSupport(ModelMBeanInfo mbi)
mbi
- the ModelMBeanInfo instance from which the ModelMBeanInfo
being created is initialized.public ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)
className
- classname of the MBeandescription
- human readable description of the
ModelMBeanattributes
- array of ModelMBeanAttributeInfo objects
which have descriptorsconstructors
- array of ModelMBeanConstructorInfo
objects which have descriptorsoperations
- array of ModelMBeanOperationInfo objects
which have descriptorsnotifications
- array of ModelMBeanNotificationInfo
objects which have descriptorspublic ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor mbeandescriptor)
className
- classname of the MBeandescription
- human readable description of the
ModelMBeanattributes
- array of ModelMBeanAttributeInfo objects
which have descriptorsconstructors
- array of ModelMBeanConstructorInfo
objects which have descriptoroperations
- array of ModelMBeanOperationInfo objects
which have descriptornotifications
- array of ModelMBeanNotificationInfo
objects which have descriptormbeandescriptor
- descriptor to be used as the
MBeanDescriptor containing MBean wide policy. If the
descriptor is null, a default descriptor will be constructed.
The default descriptor is:
name=className, descriptorType=mbean, displayName=className,
persistPolicy=never, log=F, visibility=1. If the
descriptor does not contain all these fields, they will be
added with these default values.Method Detail |
---|
public Object clone()
clone
in class MBeanInfo
public ModelMBeanAttributeInfo getAttribute(String inName) throws MBeanException, RuntimeOperationsException
inName
MBeanException
RuntimeOperationsException
public ModelMBeanConstructorInfo getConstructor(String inName) throws MBeanException, RuntimeOperationsException
inName
- the name of the constructor.MBeanException
- Wraps a distributed communication Exception.RuntimeOperationsException
- Wraps an IllegalArgumentException
for a null constructor name.public Descriptor getDescriptor()
getDescriptor
in class MBeanInfo
public Descriptor getDescriptor(String inDescriptorName) throws MBeanException, RuntimeOperationsException
inDescriptorName
- The name of the descriptor.MBeanException
- Wraps a distributed communication Exception.RuntimeOperationsException
- Wraps an IllegalArgumentException
for null name.public Descriptor getDescriptor(String inDescriptorName, String inDescriptorType) throws MBeanException, RuntimeOperationsException
inDescriptorName
inDescriptorType
MBeanException
RuntimeOperationsException
public Descriptor[] getDescriptors(String inDescriptorType) throws MBeanException, RuntimeOperationsException
inDescriptorType
MBeanException
RuntimeOperationsException
public Descriptor getMBeanDescriptor() throws MBeanException
MBeanException
public ModelMBeanNotificationInfo getNotification(String inName) throws MBeanException, RuntimeOperationsException
inName
MBeanException
RuntimeOperationsException
public ModelMBeanOperationInfo getOperation(String inName) throws MBeanException, RuntimeOperationsException
inName
MBeanException
RuntimeOperationsException
public void setDescriptor(Descriptor inDescriptor, String inDescriptorType) throws MBeanException, RuntimeOperationsException
inDescriptor
inDescriptorType
MBeanException
RuntimeOperationsException
public void setDescriptors(Descriptor[] inDescriptors) throws MBeanException, RuntimeOperationsException
inDescriptors
MBeanException
RuntimeOperationsException
public void setMBeanDescriptor(Descriptor inMBeanDescriptor) throws MBeanException, RuntimeOperationsException
inMBeanDescriptor
MBeanException
RuntimeOperationsException
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |