is new.
java.lang.Objectjavax.management.MBeanInfo
public class MBeanInfo
Describes the management interface exposed by an MBean; that is, the set of attributes and operations which are available for management operations. Instances of this class are immutable. Subclasses may be mutable but this is not recommended.
The contents of the MBeanInfo for a Dynamic MBean are determined by its getMBeanInfo() method. This includes Open MBeans and Model MBeans, which are kinds of Dynamic MBeans.
The contents of the MBeanInfo for a Standard MBean are determined by the MBean server as follows:
The description returned by getDescription() and the descriptions of the contained attributes and operations are determined by the corresponding Description annotations if any; otherwise their contents are not specified.
The remaining details of the MBeanInfo for a Standard MBean are not specified. This includes the description of any contained constructors, and notifications; the names of parameters to constructors and operations; and the descriptions of constructor parameters.
| Constructor Summary | |
|---|---|
|
MBeanInfo
(
String
className,
String
description,
MBeanAttributeInfo
[] attributes,
MBeanConstructorInfo
[] constructors,
MBeanOperationInfo
[] operations,
MBeanNotificationInfo
[] notifications) Constructs an MBeanInfo. |
|
|
MBeanInfo
(
String
className,
String
description,
MBeanAttributeInfo
[] attributes,
MBeanConstructorInfo
[] constructors,
MBeanOperationInfo
[] operations,
MBeanNotificationInfo
[] notifications,
Descriptor
descriptor) Constructs an MBeanInfo. |
|
| Method Summary | |
|---|---|
| Object |
clone
() Returns a shallow clone of this instance. |
| boolean |
equals
(
Object
o) Compare this MBeanInfo to another. |
| MBeanAttributeInfo [] |
getAttributes
() Returns the list of attributes exposed for management. |
| String |
getClassName
() Returns the name of the Java class of the MBean described by this MBeanInfo. |
| MBeanConstructorInfo [] |
getConstructors
() Returns the list of the public constructors of the MBean. |
| String |
getDescription
() Returns a human readable description of the MBean. |
| Descriptor |
getDescriptor
() Get the descriptor of this MBeanInfo. |
| MBeanNotificationInfo [] |
getNotifications
() Returns the list of the notifications emitted by the MBean. |
| MBeanOperationInfo [] |
getOperations
() Returns the list of operations of the MBean. |
| int |
hashCode
() Returns a hash code value for the object. |
| String |
toString
() Returns a string representation of the object. |
| Methods inherited from class java.lang. Object |
|---|
| finalize , getClass , notify , notifyAll , wait , wait , wait |
| Constructor Detail |
|---|
public MBeanInfo(String className,
String description,
MBeanAttributeInfo[] attributes,
MBeanConstructorInfo[] constructors,
MBeanOperationInfo[] operations,
MBeanNotificationInfo[] notifications)
throws IllegalArgumentException
public MBeanInfo(String className,
String description,
MBeanAttributeInfo[] attributes,
MBeanConstructorInfo[] constructors,
MBeanOperationInfo[] operations,
MBeanNotificationInfo[] notifications,
Descriptor descriptor)
throws IllegalArgumentException
This may be null which is equivalent to an empty descriptor.
| Method Detail |
|---|
public Object clone()
Returns a shallow clone of this instance. The clone is obtained by simply calling super.clone() , thus calling the default native shallow cloning mechanism implemented by Object.clone() . No deeper cloning of any internal field is made.
Since this class is immutable, the clone method is chiefly of interest to subclasses.
public String getClassName()
public String getDescription()
public MBeanAttributeInfo[] getAttributes()
public MBeanOperationInfo[] getOperations()
public MBeanConstructorInfo[] getConstructors()
Returns the list of the public constructors of the MBean. Each constructor is described by an MBeanConstructorInfo object.
The returned array is a shallow copy of the internal array, which means that it is a copy of the internal array of references to the MBeanConstructorInfo objects but that each referenced MBeanConstructorInfo object is not copied.
The returned list is not necessarily exhaustive. That is, the MBean may have a public constructor that is not in the list. In this case, the MBean server can construct another instance of this MBean's class using that constructor, even though it is not listed here.
public MBeanNotificationInfo[] getNotifications()
public Descriptor getDescriptor()
public String toString()
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public boolean equals(Object o)
Compare this MBeanInfo to another. Two MBeanInfo objects are equal
if and only if
iff
they return equal values for
getClassName()
, for
getDescription()
, and for
getDescriptor()
, and the arrays returned by the two objects for
getAttributes()
,
getOperations()
,
getConstructors()
, and
getNotifications()
are pairwise equal. Here "equal" means
Object.equals(Object)
, not identity.
If two MBeanInfo objects return the same values in one of their arrays but in a different order then they are not equal.
if and only if
public int hashCode()
The general contract of hashCode is:
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the Java TM programming language.)