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, getOperations
finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations
public 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.