- java.lang.Object
-
- javax.management.MBeanInfo
-
- javax.management.openmbean.OpenMBeanInfoSupport
-
- 实现的所有接口
-
Serializable,Cloneable,DescriptorRead,OpenMBeanInfo
public class OpenMBeanInfoSupport extends MBeanInfo implements OpenMBeanInfo
OpenMBeanInfoSupport类描述了open MBean的管理信息:它是MBeanInfo的子类,它实现了OpenMBeanInfo接口。 请注意,如果open MBean的getMBeanInfo()方法返回实现OpenMBeanInfo接口的类的实例(通常为OpenMBeanInfoSupport,则会将其识别为此类MBean 。- 从以下版本开始:
- 1.5
- 另请参见:
- Serialized Form
-
-
构造方法摘要
构造方法 构造器 描述 OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications)构造一个OpenMBeanInfoSupport实例,其描述了open MBean类具有指定的className,description,openAttributes,openConstructors,openOperations和notifications。OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications, Descriptor descriptor)构造一个OpenMBeanInfoSupport实例,其描述了open MBean类具有指定的className,description,openAttributes,openConstructors,openOperations,notifications,和descriptor。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 booleanequals(Object obj)将指定的obj参数与此OpenMBeanInfoSupport实例进行比较以获得相等性。inthashCode()返回此OpenMBeanInfoSupport实例的哈希码值。StringtoString()返回此OpenMBeanInfoSupport实例的字符串表示形式。-
声明方法的类 javax.management.MBeanInfo
clone, getAttributes, getClassName, getConstructors, getDescription, getDescriptor, getNotifications, getOperations
-
声明方法的接口 javax.management.openmbean.OpenMBeanInfo
getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations
-
-
-
-
构造方法详细信息
-
OpenMBeanInfoSupport
public OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications)
构造一个
OpenMBeanInfoSupport实例,其描述了open MBean类具有指定的className,description,openAttributes,openConstructors,openOperations和notifications。的
openAttributes,openConstructors,openOperations和notifications阵列参数内部复制,因此由这些参数所引用的阵列的后续变化对这种情况下没有影响。- 参数
-
className- 此OpenMBeanInfoSupport实例描述的open MBean的完全限定Java类名。 -
description- 此OpenMBeanInfoSupport实例描述的open MBean的可读描述。 -
openAttributes- 描述的open MBean的公开属性列表; 必须是子类MBeanAttributeInfo的实例数组,通常为OpenMBeanAttributeInfoSupport。 -
openConstructors- 所描述的open MBean的公开构造函数列表; 必须是子类MBeanConstructorInfo的实例数组,通常为OpenMBeanConstructorInfoSupport。 -
openOperations- 所描述的open MBean的公开操作列表。 必须是子类MBeanOperationInfo的实例数组,通常为OpenMBeanOperationInfoSupport。 -
notifications- 描述的open MBean发出的通知列表。 - 异常
-
ArrayStoreException-如果openAttributes,openConstructors或openOperations不是的子类的实例的数组MBeanAttributeInfo,MBeanConstructorInfo或MBeanOperationInfo分别。
-
OpenMBeanInfoSupport
public OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications, Descriptor descriptor)
构造一个
OpenMBeanInfoSupport实例,其描述了open MBean类具有指定的className,description,openAttributes,openConstructors,openOperations,notifications,和descriptor。的
openAttributes,openConstructors,openOperations和notifications阵列参数内部复制,因此由这些参数所引用的阵列的后续变化对这种情况下没有影响。- 参数
-
className- 此OpenMBeanInfoSupport实例描述的open MBean的完全限定Java类名。 -
description- 此OpenMBeanInfoSupport实例描述的open MBean的可读描述。 -
openAttributes- 描述的open MBean的公开属性列表; 必须是子类MBeanAttributeInfo的实例数组,通常为OpenMBeanAttributeInfoSupport。 -
openConstructors- 所描述的open MBean的公开构造函数列表; 必须是子类MBeanConstructorInfo的实例数组,通常为OpenMBeanConstructorInfoSupport。 -
openOperations- 所描述的open MBean的公开操作列表。 必须是子类MBeanOperationInfo的实例数组,通常为OpenMBeanOperationInfoSupport。 -
notifications- 描述的open MBean发出的通知列表。 -
descriptor- MBean的描述符。 这可以是null,这相当于空描述符。 - 异常
-
ArrayStoreException-如果openAttributes,openConstructors或openOperations不是的子类的实例的数组MBeanAttributeInfo,MBeanConstructorInfo或MBeanOperationInfo分别。 - 从以下版本开始:
- 1.6
-
-
方法详细信息
-
equals
public boolean equals(Object obj)
将指定的
obj参数与此OpenMBeanInfoSupport实例进行比较以获得相等性。当且仅当以下所有语句都为真时,返回
true:-
obj非null, -
obj还实现了OpenMBeanInfo接口, - 他们的班级名字相同
- 他们在属性,构造函数,操作和通知方面的信息是相同的
equals方法适用于obj参数,这些参数是OpenMBeanInfo接口的不同实现。- Specified by:
-
equals接口OpenMBeanInfo - 重写:
-
equals在类MBeanInfo - 参数
-
obj- 要与此OpenMBeanInfoSupport实例进行相等性比较的对象; - 结果
-
true如果指定的对象等于此OpenMBeanInfoSupport实例。 - 另请参见:
-
Object.hashCode(),HashMap
-
-
hashCode
public int hashCode()
返回此
OpenMBeanInfoSupport实例的哈希码值。OpenMBeanInfoSupport实例的哈希码是equals比较中使用的所有信息元素的哈希码的总和(即:其类名,及其在属性,构造函数,操作和通知上的信息,其中每个数组的hashCode)通过致电new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode()计算。这确保了
t1.equals(t2)意味着t1.hashCode()==t2.hashCode()对于任何两个OpenMBeanInfoSupport实例t1和t2,所要求的方法的常规合同Object.hashCode()。然而,请注意,执行一类的其他实例
OpenMBeanInfo接口可以等于这个OpenMBeanInfoSupport例如通过定义equals(java.lang.Object),但是如果它的计算方法不同可具有不同的哈希码。由于
OpenMBeanInfoSupport实例是不可变的,因此在第一次调用hashCode,此实例的哈希码计算一次,然后为后续调用返回相同的值。- Specified by:
-
hashCode接口OpenMBeanInfo - 重写:
-
hashCode在类Object - 结果
-
此
OpenMBeanInfoSupport实例的哈希码值 - 另请参见:
-
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
-
toString
public String toString()
返回此
OpenMBeanInfoSupport实例的字符串表示形式。字符串表示由此类的名称(即
javax.management.openmbean.OpenMBeanInfoSupport),MBean类名,属性上的信息的字符串表示,构造函数,所描述的MBean的操作和通知以及描述符的字符串表示组成。由于
OpenMBeanInfoSupport实例是不可变的,因此在第一次调用toString,将计算此实例的字符串表示形式一次,然后为后续调用返回相同的值。- Specified by:
-
toString在界面OpenMBeanInfo - 重写:
-
toString在类Object - 结果
-
此
OpenMBeanInfoSupport实例的字符串表示形式
-
-