javax.management.openmbean
Class OpenMBeanInfoSupport

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo 
      extended by javax.management.openmbean.OpenMBeanInfoSupport
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 , OpenMBeanInfo sample code for javax.management.openmbean.OpenMBeanInfo definition code for javax.management.openmbean.OpenMBeanInfo

public class OpenMBeanInfoSupport
extends MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo
implements OpenMBeanInfo sample code for javax.management.openmbean.OpenMBeanInfo definition code for javax.management.openmbean.OpenMBeanInfo , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

The OpenMBeanInfoSupport class describes the management information of an open MBean: it is a subclass of MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo , and it implements the OpenMBeanInfo sample code for javax.management.openmbean.OpenMBeanInfo definition code for javax.management.openmbean.OpenMBeanInfo interface. Note that an open MBean is recognized as such if its getMBeanInfo() method returns an instance of a class which implements the OpenMBeanInfo interface, typically OpenMBeanInfoSupport.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
OpenMBeanInfoSupport sample code for javax.management.openmbean.OpenMBeanInfoSupport.OpenMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanAttributeInfo[], javax.management.openmbean.OpenMBeanConstructorInfo[], javax.management.openmbean.OpenMBeanOperationInfo[], javax.management.MBeanNotificationInfo[]) definition code for javax.management.openmbean.OpenMBeanInfoSupport.OpenMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanAttributeInfo[], javax.management.openmbean.OpenMBeanConstructorInfo[], javax.management.openmbean.OpenMBeanOperationInfo[], 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, OpenMBeanAttributeInfo sample code for javax.management.openmbean.OpenMBeanAttributeInfo definition code for javax.management.openmbean.OpenMBeanAttributeInfo [] openAttributes, OpenMBeanConstructorInfo sample code for javax.management.openmbean.OpenMBeanConstructorInfo definition code for javax.management.openmbean.OpenMBeanConstructorInfo [] openConstructors, OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo [] openOperations, MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] notifications)
          Constructs an OpenMBeanInfoSupport instance, which describes a class of open MBeans with the specified className, description, openAttributes, openConstructors , openOperations and notifications.
 
Method Summary
 boolean equals sample code for javax.management.openmbean.OpenMBeanInfoSupport.equals(java.lang.Object) definition code for javax.management.openmbean.OpenMBeanInfoSupport.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares the specified obj parameter with this OpenMBeanInfoSupport instance for equality.
 int hashCode sample code for javax.management.openmbean.OpenMBeanInfoSupport.hashCode() definition code for javax.management.openmbean.OpenMBeanInfoSupport.hashCode() ()
          Returns the hash code value for this OpenMBeanInfoSupport instance.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.openmbean.OpenMBeanInfoSupport.toString() definition code for javax.management.openmbean.OpenMBeanInfoSupport.toString() ()
          Returns a string representation of this OpenMBeanInfoSupport instance.
 
Methods inherited from class javax.management.MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo
clone sample code for javax.management.MBeanInfo.clone() definition code for javax.management.MBeanInfo.clone() , getAttributes sample code for javax.management.MBeanInfo.getAttributes() definition code for javax.management.MBeanInfo.getAttributes() , getClassName sample code for javax.management.MBeanInfo.getClassName() definition code for javax.management.MBeanInfo.getClassName() , getConstructors sample code for javax.management.MBeanInfo.getConstructors() definition code for javax.management.MBeanInfo.getConstructors() , getDescription sample code for javax.management.MBeanInfo.getDescription() definition code for javax.management.MBeanInfo.getDescription() , getNotifications sample code for javax.management.MBeanInfo.getNotifications() definition code for javax.management.MBeanInfo.getNotifications() , getOperations sample code for javax.management.MBeanInfo.getOperations() definition code for javax.management.MBeanInfo.getOperations()
 
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() , 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)
 
Methods inherited from interface javax.management.openmbean.OpenMBeanInfo sample code for javax.management.openmbean.OpenMBeanInfo definition code for javax.management.openmbean.OpenMBeanInfo
getAttributes sample code for javax.management.openmbean.OpenMBeanInfo.getAttributes() definition code for javax.management.openmbean.OpenMBeanInfo.getAttributes() , getClassName sample code for javax.management.openmbean.OpenMBeanInfo.getClassName() definition code for javax.management.openmbean.OpenMBeanInfo.getClassName() , getConstructors sample code for javax.management.openmbean.OpenMBeanInfo.getConstructors() definition code for javax.management.openmbean.OpenMBeanInfo.getConstructors() , getDescription sample code for javax.management.openmbean.OpenMBeanInfo.getDescription() definition code for javax.management.openmbean.OpenMBeanInfo.getDescription() , getNotifications sample code for javax.management.openmbean.OpenMBeanInfo.getNotifications() definition code for javax.management.openmbean.OpenMBeanInfo.getNotifications() , getOperations sample code for javax.management.openmbean.OpenMBeanInfo.getOperations() definition code for javax.management.openmbean.OpenMBeanInfo.getOperations()
 

Constructor Detail

OpenMBeanInfoSupport sample code for javax.management.openmbean.OpenMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanAttributeInfo[], javax.management.openmbean.OpenMBeanConstructorInfo[], javax.management.openmbean.OpenMBeanOperationInfo[], javax.management.MBeanNotificationInfo[]) definition code for javax.management.openmbean.OpenMBeanInfoSupport(java.lang.String, java.lang.String, javax.management.openmbean.OpenMBeanAttributeInfo[], javax.management.openmbean.OpenMBeanConstructorInfo[], javax.management.openmbean.OpenMBeanOperationInfo[], javax.management.MBeanNotificationInfo[])

public OpenMBeanInfoSupport(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,
                            OpenMBeanAttributeInfo sample code for javax.management.openmbean.OpenMBeanAttributeInfo definition code for javax.management.openmbean.OpenMBeanAttributeInfo [] openAttributes,
                            OpenMBeanConstructorInfo sample code for javax.management.openmbean.OpenMBeanConstructorInfo definition code for javax.management.openmbean.OpenMBeanConstructorInfo [] openConstructors,
                            OpenMBeanOperationInfo sample code for javax.management.openmbean.OpenMBeanOperationInfo definition code for javax.management.openmbean.OpenMBeanOperationInfo [] openOperations,
                            MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] notifications)
Constructs an OpenMBeanInfoSupport instance, which describes a class of open MBeans with the specified className, description, openAttributes, openConstructors , openOperations and notifications.

The openAttributes, openConstructors, openOperations and notifications array parameters are internally copied, so that subsequent changes to the arrays referenced by these parameters have no effect on this instance.

Parameters:
className - The fully qualified Java class name of the open MBean described by this OpenMBeanInfoSupport instance.
description - A human readable description of the open MBean described by this OpenMBeanInfoSupport instance.
openAttributes - The list of exposed attributes of the described open MBean; Must be an array of instances of a subclass of MBeanAttributeInfo, typically OpenMBeanAttributeInfoSupport.
openConstructors - The list of exposed public constructors of the described open MBean; Must be an array of instances of a subclass of MBeanConstructorInfo, typically OpenMBeanConstructorInfoSupport.
openOperations - The list of exposed operations of the described open MBean. Must be an array of instances of a subclass of MBeanOperationInfo, typically OpenMBeanOperationInfoSupport.
notifications - The list of notifications emitted by the described open MBean.
Throws:
ArrayStoreException sample code for java.lang.ArrayStoreException definition code for java.lang.ArrayStoreException - If openAttributes, openConstructors or openOperations is not an array of instances of a subclass of MBeanAttributeInfo, MBeanConstructorInfo or MBeanOperationInfo respectively.
Method Detail

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

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares the specified obj parameter with this OpenMBeanInfoSupport instance for equality.

Returns true if and only if all of the following statements are true:

This ensures that this equals method works properly for obj parameters which are different implementations of the OpenMBeanInfo interface.
 

Specified by:
equals sample code for javax.management.openmbean.OpenMBeanInfo.equals(java.lang.Object) definition code for javax.management.openmbean.OpenMBeanInfo.equals(java.lang.Object) in interface OpenMBeanInfo sample code for javax.management.openmbean.OpenMBeanInfo definition code for javax.management.openmbean.OpenMBeanInfo
Overrides:
equals sample code for javax.management.MBeanInfo.equals(java.lang.Object) definition code for javax.management.MBeanInfo.equals(java.lang.Object) in class MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo
Parameters:
obj - the object to be compared for equality with this OpenMBeanInfoSupport instance;
Returns:
true if the specified object is equal to this OpenMBeanInfoSupport instance.
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.openmbean.OpenMBeanInfoSupport.hashCode() definition code for javax.management.openmbean.OpenMBeanInfoSupport.hashCode()

public int hashCode()
Returns the hash code value for this OpenMBeanInfoSupport instance.

The hash code of an OpenMBeanInfoSupport instance is the sum of the hash codes of all elements of information used in equals comparisons (ie: its class name, and its infos on attributes, constructors, operations and notifications, where the hashCode of each of these arrays is calculated by a call to new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode()).

This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two OpenMBeanInfoSupport instances t1 and t2, as required by the general contract of the method Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() .

However, note that another instance of a class implementing the OpenMBeanInfo interface may be equal to this OpenMBeanInfoSupport instance as defined by equals(java.lang.Object) sample code for javax.management.openmbean.OpenMBeanInfoSupport.equals(java.lang.Object) definition code for javax.management.openmbean.OpenMBeanInfoSupport.equals(java.lang.Object) , but may have a different hash code if it is calculated differently.

As OpenMBeanInfoSupport instances are immutable, the hash code for this instance is calculated once, on the first call to hashCode, and then the same value is returned for subsequent calls.

Specified by:
hashCode sample code for javax.management.openmbean.OpenMBeanInfo.hashCode() definition code for javax.management.openmbean.OpenMBeanInfo.hashCode() in interface OpenMBeanInfo sample code for javax.management.openmbean.OpenMBeanInfo definition code for javax.management.openmbean.OpenMBeanInfo
Overrides:
hashCode sample code for javax.management.MBeanInfo.hashCode() definition code for javax.management.MBeanInfo.hashCode() in class MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo
Returns:
the hash code value for this OpenMBeanInfoSupport instance
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

toString sample code for javax.management.openmbean.OpenMBeanInfoSupport.toString() definition code for javax.management.openmbean.OpenMBeanInfoSupport.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of this OpenMBeanInfoSupport instance.

The string representation consists of the name of this class (ie javax.management.openmbean.OpenMBeanInfoSupport), the MBean class name, and the string representation of infos on attributes, constructors, operations and notifications of the described MBean.

As OpenMBeanInfoSupport instances are immutable, the string representation for this instance is calculated once, on the first call to toString, and then the same value is returned for subsequent calls.

Specified by:
toString sample code for javax.management.openmbean.OpenMBeanInfo.toString() definition code for javax.management.openmbean.OpenMBeanInfo.toString() in interface OpenMBeanInfo sample code for javax.management.openmbean.OpenMBeanInfo definition code for javax.management.openmbean.OpenMBeanInfo
Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a string representation of this OpenMBeanInfoSupport instance