- 所有已实现的接口:
-
Serializable,Cloneable,DescriptorRead,OpenMBeanInfo
OpenMBeanInfoSupport类描述了一个开放MBean的管理信息:它是MBeanInfo的子类,并实现了OpenMBeanInfo接口。请注意,如果其getMBeanInfo()方法返回实现OpenMBeanInfo接口的类的实例,通常是OpenMBeanInfoSupport,则将开放MBean识别为这样的MBean。
- 自从:
- 1.5
- 参见:
-
Constructor Summary
ConstructorsConstructorDescriptionOpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications) 构造一个OpenMBeanInfoSupport实例,描述具有指定className、description、openAttributes、openConstructors、openOperations和notifications的开放MBean类。OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications, Descriptor descriptor) 构造一个OpenMBeanInfoSupport实例,描述具有指定className、description、openAttributes、openConstructors、openOperations、notifications和descriptor的开放MBean类。 -
Method Summary
Methods declared in class javax.management.MBeanInfo
clone, getAttributes, getClassName, getConstructors, getDescription, getDescriptor, getNotifications, getOperationsMethods declared in interface javax.management.openmbean.OpenMBeanInfo
getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations
-
Constructor Details
-
OpenMBeanInfoSupport
public OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications) 构造一个
OpenMBeanInfoSupport实例,描述具有指定className、description、openAttributes、openConstructors、openOperations和notifications的开放MBean类。openAttributes、openConstructors、openOperations和notifications数组参数会被内部复制,因此对这些参数引用的数组进行的后续更改不会影响此实例。- 参数:
-
className- 此OpenMBeanInfoSupport实例描述的开放MBean的完全限定Java类名。 -
description- 此OpenMBeanInfoSupport实例描述的开放MBean的可读描述。 -
openAttributes- 描述的开放MBean的暴露属性列表;必须是MBeanAttributeInfo子类的实例数组,通常是OpenMBeanAttributeInfoSupport。 -
openConstructors- 描述的开放MBean的公共构造函数列表;必须是MBeanConstructorInfo子类的实例数组,通常是OpenMBeanConstructorInfoSupport。 -
openOperations- 描述的开放MBean的暴露操作列表。必须是MBeanOperationInfo子类的实例数组,通常是OpenMBeanOperationInfoSupport。 -
notifications- 描述的开放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实例,描述具有指定className、description、openAttributes、openConstructors、openOperations、notifications和descriptor的开放MBean类。openAttributes、openConstructors、openOperations和notifications数组参数会被内部复制,因此对这些参数引用的数组进行的后续更改不会影响此实例。- 参数:
-
className- 此OpenMBeanInfoSupport实例描述的开放MBean的完全限定Java类名。 -
description- 此OpenMBeanInfoSupport实例描述的开放MBean的可读描述。 -
openAttributes- 描述的开放MBean的暴露属性列表;必须是MBeanAttributeInfo子类的实例数组,通常是OpenMBeanAttributeInfoSupport。 -
openConstructors- 描述的开放MBean的公共构造函数列表;必须是MBeanConstructorInfo子类的实例数组,通常是OpenMBeanConstructorInfoSupport。 -
openOperations- 描述的开放MBean的暴露操作列表。必须是MBeanOperationInfo子类的实例数组,通常是OpenMBeanOperationInfoSupport。 -
notifications- 描述的开放MBean发出的通知列表。 -
descriptor- MBean的描述符。这可能为null,相当于空描述符。 - 抛出:
-
ArrayStoreException- 如果openAttributes、openConstructors或openOperations不是MBeanAttributeInfo、MBeanConstructorInfo或MBeanOperationInfo的子类实例数组。 - 自从:
- 1.6
-
-
Method Details
-
equals
将指定的
obj参数与此OpenMBeanInfoSupport实例进行比较,以确定它们是否相等。仅当以下所有语句都为真时,返回
true:obj不为null,obj也实现了OpenMBeanInfo接口,- 它们的类名相等,
- 它们的属性、构造函数、操作和通知信息相等。
OpenMBeanInfo接口的obj参数,此equals方法能正常工作。- 指定者:
-
equals在接口OpenMBeanInfo - 覆盖:
-
equals在类MBeanInfo - 参数:
-
obj- 与此OpenMBeanInfoSupport实例比较是否相等的对象; - 返回:
-
如果指定的对象等于此
OpenMBeanInfoSupport实例,则返回true。 - 参见:
-
hashCode
public int hashCode()返回此
OpenMBeanInfoSupport实例的哈希码值。OpenMBeanInfoSupport实例的哈希码是用于equals比较中使用的所有信息元素的哈希码之和(即:其类名,以及其属性、构造函数、操作和通知信息的哈希码,其中每个数组的hashCode通过调用new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode()来计算)。这确保了对于任何两个
OpenMBeanInfoSupport实例t1和t2,如果t1.equals(t2),则t1.hashCode()==t2.hashCode(),这是Object.hashCode()方法的一般契约所要求的。但是,请注意,另一个实现
OpenMBeanInfo接口的类的实例可能与此OpenMBeanInfoSupport实例相等(由equals(java.lang.Object)定义),但如果计算方式不同,则可能具有不同的哈希码。由于
OpenMBeanInfoSupport实例是不可变的,因此此实例的哈希码在第一次调用hashCode时计算,然后对后续调用返回相同的值。- 指定者:
-
hashCode在接口OpenMBeanInfo - 覆盖:
-
hashCode在类Object - 返回:
-
此
OpenMBeanInfoSupport实例的哈希码值 - 参见:
-
toString
返回此
OpenMBeanInfoSupport实例的字符串表示形式。字符串表示形式包括此类的名称(即
javax.management.openmbean.OpenMBeanInfoSupport)、MBean 类名,描述的 MBean 的属性、构造函数、操作和通知的信息的字符串表示形式以及描述符的字符串表示形式。由于
OpenMBeanInfoSupport实例是不可变的,因此对于此实例的字符串表示形式在第一次调用toString时计算一次,然后对于后续调用返回相同的值。- 指定者:
-
toString在接口OpenMBeanInfo - 覆盖:
-
toString在类Object - 返回:
-
此
OpenMBeanInfoSupport实例的字符串表示形式
-