public class OpenMBeanInfoSupport extends MBeanInfo implements OpenMBeanInfo
OpenMBeanInfoSupport类描述了一个开放的MBean的管理信息 :它是一个MBeanInfo的子类,它实现了OpenMBeanInfo接口。
请注意,一个开放的MBean被识别为例如如果其getMBeanInfo()方法返回实现OpenMBeanInfo接口,通常是类的实例OpenMBeanInfoSupport 。
| Constructor and Description |
|---|
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 。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
将指定的
obj参数与此
OpenMBeanInfoSupport实例相比较。
|
int |
hashCode()
返回此
OpenMBeanInfoSupport实例的哈希码值。
|
String |
toString()
返回此
OpenMBeanInfoSupport实例的字符串表示形式。
|
clone, getAttributes, getClassName, getConstructors, getDescription, getDescriptor, getNotifications, getOperationsfinalize, getClass, notify, notifyAll, wait, wait, waitgetAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperationspublic 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实例描述的开放MBean的完全限定的Java类名称。
description - 由本
OpenMBeanInfoSupport实例描述的开放MBean的可读描述。
openAttributes - 描述的开放MBean的暴露属性列表;
必须是MBeanAttributeInfo的子类的MBeanAttributeInfo ,通常为OpenMBeanAttributeInfoSupport 。
openConstructors - 描述的开放MBean的暴露的公共构造函数的列表;
必须是MBeanConstructorInfo的子类的MBeanConstructorInfo ,通常为OpenMBeanConstructorInfoSupport 。
openOperations - 描述的开放MBean的暴露操作列表。
必须是MBeanOperationInfo的子类的MBeanOperationInfo ,通常为OpenMBeanOperationInfoSupport 。
notifications - 描述的开放MBean发出的通知列表。
ArrayStoreException -如果
openAttributes ,
openConstructors或
openOperations不是的子类的实例的数组
MBeanAttributeInfo ,
MBeanConstructorInfo或
MBeanOperationInfo分别。
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实例描述的开放MBean的完全限定的Java类名称。
description - 由该
OpenMBeanInfoSupport实例描述的开放MBean的可读描述。
openAttributes - 描述的开放MBean的暴露属性列表;
必须是MBeanAttributeInfo的子类的MBeanAttributeInfo ,通常为OpenMBeanAttributeInfoSupport 。
openConstructors - 描述的开放MBean的暴露的公共构造函数的列表;
必须是MBeanConstructorInfo子类的MBeanConstructorInfo数组,通常为OpenMBeanConstructorInfoSupport 。
openOperations - 描述的开放MBean的暴露操作的列表。
必须是MBeanOperationInfo子类的MBeanOperationInfo数组,通常为OpenMBeanOperationInfoSupport 。
notifications - 描述的开放MBean发出的通知的列表。
descriptor - MBean的描述符。
这可能是空的,这相当于空描述符。
ArrayStoreException -如果
openAttributes ,
openConstructors或
openOperations不是的子类的实例的数组
MBeanAttributeInfo ,
MBeanConstructorInfo或
MBeanOperationInfo分别。
public boolean equals(Object obj)
将指定的obj参数与此OpenMBeanInfoSupport实例相比较。
返回true当且仅当以下所有语句都为真时:
obj为非空, obj还实现了OpenMBeanInfo接口, equals方法适用于obj参数,这些参数是OpenMBeanInfo接口的OpenMBeanInfo实现。
equals在接口
OpenMBeanInfo
equals在
MBeanInfo
obj - 要与此
OpenMBeanInfoSupport实例相等的对象;
true如果指定的对象等于这个
OpenMBeanInfoSupport实例。
Object.hashCode() , HashMap
public int hashCode()
返回此OpenMBeanInfoSupport实例的哈希码值。
一个的哈希码OpenMBeanInfoSupport实例中使用的所有信息元素的哈希码的总和equals比较(即:它的类名,并其上的属性,构造,操作和通知,每个阵列中的其中哈希码的相关信息通过调用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时,该实例的哈希代码将被计算一次,然后为后续调用返回相同的值。
hashCode在接口
OpenMBeanInfo
hashCode在
MBeanInfo类
OpenMBeanInfoSupport实例的哈希码值
Object.equals(java.lang.Object) ,
System.identityHashCode(java.lang.Object)
public String toString()
返回此OpenMBeanInfoSupport实例的字符串表示形式。
字符串表示由此类的名称(即javax.management.openmbean.OpenMBeanInfoSupport ),MBean类名称,描述的MBean的属性,构造函数,操作和通知以及描述符的字符串表示形式的信息的字符串表示形式组成。
由于OpenMBeanInfoSupport实例是不可变的,因此在第一次调用toString时,该实例的字符串表示计算一次,然后为后续调用返回相同的值。
toString在接口
OpenMBeanInfo
toString在
MBeanInfo
OpenMBeanInfoSupport实例的字符串表示法
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.