- 所有已实现的接口:
Serializable
,Cloneable
,DescriptorRead
,OpenMBeanInfo
OpenMBeanInfoSupport
类描述了一个管理信息打开MBean它是 MBeanInfo
的子类,它实现了 OpenMBeanInfo
接口。请注意,一个打开MBean如果它的 getMBeanInfo()
方法返回一个实现 OpenMBeanInfo 接口的类的实例,通常是 OpenMBeanInfoSupport
,则被识别为这样。
- 自从:
- 1.5
- 参见:
-
构造方法总结
构造方法构造方法描述OpenMBeanInfoSupport
(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。 -
方法总结
在类 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
实例,它描述了一类具有指定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 的描述符。这可能是空的,相当于一个空的描述符。- 抛出:
ArrayStoreException
- 如果openAttributes
、openConstructors
或openOperations
不是MBeanAttributeInfo
、MBeanConstructorInfo
或MBeanOperationInfo
的子类的实例数组。- 自从:
- 1.6
-
-
方法详情
-
equals
比较指定的
obj
参数与此OpenMBeanInfoSupport
实例是否相等。当且仅当以下所有陈述都为真时,返回
true
:obj
非空,obj
还实现了OpenMBeanInfo
接口,- 他们的类名称相等
- 它们关于属性、构造方法、操作和通知的信息是相同的
equals
方法适用于obj
参数,这些参数是OpenMBeanInfo
接口的不同实现。- 指定者:
equals
在接口OpenMBeanInfo
中- 重写:
equals
在类MBeanInfo
中- 参数:
obj
- 要与此OpenMBeanInfoSupport
实例进行相等比较的对象;- 返回:
true
如果指定对象等于此OpenMBeanInfoSupport
实例。- 参见:
-
hashCode
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
接口的类的另一个实例可能等于equals(java.lang.Object)
定义的这个OpenMBeanInfoSupport
实例,但如果计算方式不同,则可能具有不同的哈希码。由于
OpenMBeanInfoSupport
实例是不可变的,因此该实例的哈希码在第一次调用hashCode
时计算一次,然后为后续调用返回相同的值。- 指定者:
hashCode
在接口OpenMBeanInfo
中- 重写:
hashCode
在类Object
中- 返回:
-
此
OpenMBeanInfoSupport
实例的哈希码值 - 参见:
-
toString
返回此
OpenMBeanInfoSupport
实例的字符串表示形式。字符串表示包含此类的名称(即
javax.management.openmbean.OpenMBeanInfoSupport
)、MBean 类名、关于所描述 MBean 的属性、构造函数、操作和通知的信息的字符串表示以及描述符的字符串表示。由于
OpenMBeanInfoSupport
实例是不可变的,因此该实例的字符串表示在第一次调用toString
时计算一次,然后为后续调用返回相同的值。- 指定者:
toString
在接口OpenMBeanInfo
中- 重写:
toString
在类Object
中- 返回:
-
此
OpenMBeanInfoSupport
实例的字符串表示形式
-