javax.management
Class MBeanInfo

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.MBeanInfo
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable
Direct Known Subclasses:
ModelMBeanInfoSupport sample code for javax.management.modelmbean.ModelMBeanInfoSupport definition code for javax.management.modelmbean.ModelMBeanInfoSupport , OpenMBeanInfoSupport sample code for javax.management.openmbean.OpenMBeanInfoSupport definition code for javax.management.openmbean.OpenMBeanInfoSupport

public class MBeanInfo
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

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() sample code for javax.management.DynamicMBean.getMBeanInfo() definition code for javax.management.DynamicMBean.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 remaining details of the MBeanInfo for a Standard MBean are not specified. This includes the description of the MBeanInfo and of any contained constructors, attributes, operations, and notifications; and the names and descriptions of parameters to constructors and operations.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
MBeanInfo sample code for javax.management.MBeanInfo.MBeanInfo(java.lang.String, java.lang.String, javax.management.MBeanAttributeInfo[], javax.management.MBeanConstructorInfo[], javax.management.MBeanOperationInfo[], javax.management.MBeanNotificationInfo[]) definition code for javax.management.MBeanInfo.MBeanInfo(java.lang.String, java.lang.String, javax.management.MBeanAttributeInfo[], javax.management.MBeanConstructorInfo[], javax.management.MBeanOperationInfo[], javax.management.MBeanNotificationInfo[]) (String sample code for java.lang.String definition code for java.lang.String  className, String sample code for java.lang.String definition code for java.lang.String  description, MBeanAttributeInfo sample code for javax.management.MBeanAttributeInfo definition code for javax.management.MBeanAttributeInfo [] attributes, MBeanConstructorInfo sample code for javax.management.MBeanConstructorInfo definition code for javax.management.MBeanConstructorInfo [] constructors, MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo [] operations, MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] notifications)
          Constructs an MBeanInfo.
 
Method Summary
 Object sample code for java.lang.Object definition code for java.lang.Object clone sample code for javax.management.MBeanInfo.clone() definition code for javax.management.MBeanInfo.clone() ()
          Returns a shallow clone of this instance.
 boolean equals sample code for javax.management.MBeanInfo.equals(java.lang.Object) definition code for javax.management.MBeanInfo.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  o)
          Compare this MBeanInfo to another.
 MBeanAttributeInfo sample code for javax.management.MBeanAttributeInfo definition code for javax.management.MBeanAttributeInfo [] getAttributes sample code for javax.management.MBeanInfo.getAttributes() definition code for javax.management.MBeanInfo.getAttributes() ()
          Returns the list of attributes exposed for management.
 String sample code for java.lang.String definition code for java.lang.String getClassName sample code for javax.management.MBeanInfo.getClassName() definition code for javax.management.MBeanInfo.getClassName() ()
          Returns the name of the Java class of the MBean described by this MBeanInfo.
 MBeanConstructorInfo sample code for javax.management.MBeanConstructorInfo definition code for javax.management.MBeanConstructorInfo [] getConstructors sample code for javax.management.MBeanInfo.getConstructors() definition code for javax.management.MBeanInfo.getConstructors() ()
          Returns the list of the public constructors of the MBean.
 String sample code for java.lang.String definition code for java.lang.String getDescription sample code for javax.management.MBeanInfo.getDescription() definition code for javax.management.MBeanInfo.getDescription() ()
          Returns a human readable description of the MBean.
 MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotifications sample code for javax.management.MBeanInfo.getNotifications() definition code for javax.management.MBeanInfo.getNotifications() ()
          Returns the list of the notifications emitted by the MBean.
 MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo [] getOperations sample code for javax.management.MBeanInfo.getOperations() definition code for javax.management.MBeanInfo.getOperations() ()
          Returns the list of operations of the MBean.
 int hashCode sample code for javax.management.MBeanInfo.hashCode() definition code for javax.management.MBeanInfo.hashCode() ()
          Returns a hash code value for the object.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

MBeanInfo sample code for javax.management.MBeanInfo(java.lang.String, java.lang.String, javax.management.MBeanAttributeInfo[], javax.management.MBeanConstructorInfo[], javax.management.MBeanOperationInfo[], javax.management.MBeanNotificationInfo[]) definition code for javax.management.MBeanInfo(java.lang.String, java.lang.String, javax.management.MBeanAttributeInfo[], javax.management.MBeanConstructorInfo[], javax.management.MBeanOperationInfo[], javax.management.MBeanNotificationInfo[])

public MBeanInfo(String sample code for java.lang.String definition code for java.lang.String  className,
                 String sample code for java.lang.String definition code for java.lang.String  description,
                 MBeanAttributeInfo sample code for javax.management.MBeanAttributeInfo definition code for javax.management.MBeanAttributeInfo [] attributes,
                 MBeanConstructorInfo sample code for javax.management.MBeanConstructorInfo definition code for javax.management.MBeanConstructorInfo [] constructors,
                 MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo [] operations,
                 MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] notifications)
          throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Constructs an MBeanInfo.

Parameters:
className - The name of the Java class of the MBean described by this MBeanInfo. This value may be any syntactically legal Java class name. It does not have to be a Java class known to the MBean server or to the MBean's ClassLoader. If it is a Java class known to the MBean's ClassLoader, it is recommended but not required that the class's public methods include those that would appear in a Standard MBean implementing the attributes and operations in this MBeanInfo.
description - A human readable description of the MBean (optional).
attributes - The list of exposed attributes of the MBean. This may be null with the same effect as a zero-length array.
constructors - The list of public constructors of the MBean. This may be null with the same effect as a zero-length array.
operations - The list of operations of the MBean. This may be null with the same effect as a zero-length array.
notifications - The list of notifications emitted. This may be null with the same effect as a zero-length array.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException
Method Detail

clone sample code for javax.management.MBeanInfo.clone() definition code for javax.management.MBeanInfo.clone()

public Object sample code for java.lang.Object definition code for java.lang.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.

Overrides:
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a clone of this instance.
See Also:
Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

getClassName sample code for javax.management.MBeanInfo.getClassName() definition code for javax.management.MBeanInfo.getClassName()

public String sample code for java.lang.String definition code for java.lang.String  getClassName()
Returns the name of the Java class of the MBean described by this MBeanInfo.

Returns:
the class name.

getDescription sample code for javax.management.MBeanInfo.getDescription() definition code for javax.management.MBeanInfo.getDescription()

public String sample code for java.lang.String definition code for java.lang.String  getDescription()
Returns a human readable description of the MBean.

Returns:
the description.

getAttributes sample code for javax.management.MBeanInfo.getAttributes() definition code for javax.management.MBeanInfo.getAttributes()

public MBeanAttributeInfo sample code for javax.management.MBeanAttributeInfo definition code for javax.management.MBeanAttributeInfo [] getAttributes()
Returns the list of attributes exposed for management. Each attribute is described by an MBeanAttributeInfo 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 MBeanAttributeInfo objects but that each referenced MBeanAttributeInfo object is not copied.

Returns:
An array of MBeanAttributeInfo objects.

getOperations sample code for javax.management.MBeanInfo.getOperations() definition code for javax.management.MBeanInfo.getOperations()

public MBeanOperationInfo sample code for javax.management.MBeanOperationInfo definition code for javax.management.MBeanOperationInfo [] getOperations()
Returns the list of operations of the MBean. Each operation is described by an MBeanOperationInfo 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 MBeanOperationInfo objects but that each referenced MBeanOperationInfo object is not copied.

Returns:
An array of MBeanOperationInfo objects.

getConstructors sample code for javax.management.MBeanInfo.getConstructors() definition code for javax.management.MBeanInfo.getConstructors()

public MBeanConstructorInfo sample code for javax.management.MBeanConstructorInfo definition code for javax.management.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.

Returns:
An array of MBeanConstructorInfo objects.

getNotifications sample code for javax.management.MBeanInfo.getNotifications() definition code for javax.management.MBeanInfo.getNotifications()

public MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotifications()
Returns the list of the notifications emitted by the MBean. Each notification is described by an MBeanNotificationInfo 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 MBeanNotificationInfo objects but that each referenced MBeanNotificationInfo object is not copied.

Returns:
An array of MBeanNotificationInfo objects.

equals sample code for javax.management.MBeanInfo.equals(java.lang.Object) definition code for javax.management.MBeanInfo.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  o)

Compare this MBeanInfo to another. Two MBeanInfo objects are equal iff they return equal values for getClassName() sample code for javax.management.MBeanInfo.getClassName() definition code for javax.management.MBeanInfo.getClassName() and for getDescription() sample code for javax.management.MBeanInfo.getDescription() definition code for javax.management.MBeanInfo.getDescription() , and the arrays returned by the two objects for getAttributes() sample code for javax.management.MBeanInfo.getAttributes() definition code for javax.management.MBeanInfo.getAttributes() , getOperations() sample code for javax.management.MBeanInfo.getOperations() definition code for javax.management.MBeanInfo.getOperations() , getConstructors() sample code for javax.management.MBeanInfo.getConstructors() definition code for javax.management.MBeanInfo.getConstructors() , and getNotifications() sample code for javax.management.MBeanInfo.getNotifications() definition code for javax.management.MBeanInfo.getNotifications() are pairwise equal. Here "equal" means Object.equals(Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.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.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
o - the object to compare to.
Returns:
true iff o is an MBeanInfo that is equal to this one according to the rules above.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.management.MBeanInfo.hashCode() definition code for javax.management.MBeanInfo.hashCode()

public int hashCode()
Description copied from class: Object sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

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 JavaTM programming language.)

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable