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实例,描述了一类开放MBean与指定的
className,
description,
openAttributes,
openConstructors,
openOperations和
notifications。
|
OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications, Descriptor descriptor)
构建了一个
OpenMBeanInfoSupport实例,描述了一类开放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实例,描述了一类开放MBean与指定的className,description,openAttributes,openConstructors,openOperations和notifications。
的openAttributes,openConstructors,openOperations和notifications阵列参数内复制,这样的数组引用的这些参数的变化对这种情况随后没有影响。
className -完全合格的java类的名字由这个
OpenMBeanInfoSupport实例描述了开放的MBean。
description -一人通过这
OpenMBeanInfoSupport实例描述了开放MBean可读的描述。
openAttributes - MBean所描述的开放暴露的属性列表;必须对
MBeanAttributeInfo子类实例的数组,通常
OpenMBeanAttributeInfoSupport。
openConstructors -暴露的描述打开MBean的公共构造函数列表;必须对
MBeanConstructorInfo子类实例的数组,通常
OpenMBeanConstructorInfoSupport。
openOperations - MBean所描述的开放暴露的操作列表。必须对
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实例,描述了一类开放MBean与指定的className,description,openAttributes,openConstructors,openOperations,notifications,和descriptor。
的openAttributes,openConstructors,openOperations和notifications阵列参数内复制,这样的数组引用的这些参数的变化对这种情况随后没有影响。
className -完全合格的java类的名字由这个
OpenMBeanInfoSupport实例描述了开放的MBean。
description -一人通过这
OpenMBeanInfoSupport实例描述了开放MBean可读的描述。
openAttributes - MBean所描述的开放暴露的属性列表;必须对
MBeanAttributeInfo子类实例的数组,通常
OpenMBeanAttributeInfoSupport。
openConstructors -暴露的描述打开MBean的公共构造函数列表;必须对
MBeanConstructorInfo子类实例的数组,通常
OpenMBeanConstructorInfoSupport。
openOperations - MBean所描述的开放暴露的操作列表。必须对
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接口的不同实现。
equals 接口
OpenMBeanInfo
equals 方法重写,继承类
MBeanInfo
obj要比较这
OpenMBeanInfoSupport平等的对象实例;
true指定对象是否等于这
OpenMBeanInfoSupport实例。
Object.hashCode(),
HashMap
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第一次调用,然后返回相同的值的后续调用。
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.