java.lang.Object
javax.management.MBeanFeatureInfo
javax.management.MBeanNotificationInfo
javax.management.modelmbean.ModelMBeanNotificationInfo
- 所有已实现的接口:
Serializable
,Cloneable
,DescriptorAccess
,DescriptorRead
ModelMBeanNotificationInfo 对象描述由 ModelMBean 发出的通知。它是 MBeanNotificationInfo 的子类,添加了关联的 Descriptor 和 Descriptor 接口的实现。
描述符中的字段定义如下,但不限于以下内容。请注意,当此表中的 Type 为 Number 时,也可以使用作为 Long 的十进制表示形式的 String。
Name | Type | 意义 |
---|---|---|
name | String | 通知名称。 |
描述符类型 | String | 必须是“通知”。 |
严重程度 | Number | 0-6 其中 0:未知; 1:不可恢复; 2:危急,失败; 3:重大的,严重的; 4:minor, marginal, error; 5:警告; 6:正常,已清除,信息丰富 |
消息ID | String | 消息文本的唯一键(允许翻译、分析)。 |
消息文本 | String | 通知文本。 |
日志 | String | T - 记录消息,F - 不记录消息。 |
日志文件 | String | 适用于操作系统的完全限定文件名。 |
能见度 | Number | 1-4 其中 1:总是可见 4:很少可见。 |
演示字符串 | String | XML 格式的字符串以允许显示数据。 |
默认描述符包含名称、描述符类型、显示名称和严重性 (=6) 字段。 name 和 displayName 字段的默认值是 Notification 类的名称(由 ModelMBeanNotificationInfo 构造函数的 name
参数指定)。
这serialVersionUID这个类是-7445681389570207141L
。
- 自从:
- 1.5
- 参见:
-
字段摘要
在类 javax.management.MBeanFeatureInfo 中声明的字段
description, name
-
构造方法总结
构造方法构造方法描述ModelMBeanNotificationInfo
(String[] notifTypes, String name, String description) 使用默认描述符构造一个 ModelMBeanNotificationInfo 对象。ModelMBeanNotificationInfo
(String[] notifTypes, String name, String description, Descriptor descriptor) 构造一个 ModelMBeanNotificationInfo 对象。从此 ModelMBeanNotfication 对象构造一个新的 ModelMBeanNotificationInfo 对象。 -
方法总结
修饰符和类型方法描述clone()
创建并返回一个新的 ModelMBeanNotificationInfo,它是此 ModelMBeanNotificationInfo 的副本。返回 ModelMBeanNotificationInfo 的关联描述符的副本。void
setDescriptor
(Descriptor inDescriptor) 为 ModelMBeanNotificationInfo 设置关联的描述符(完全替换)如果新的描述符为空,则关联的描述符将恢复为默认描述符。toString()
返回包含 ModelMBeanNotificationInfo 的人类可读字符串。在类 javax.management.MBeanNotificationInfo 中声明的方法
equals, getNotifTypes
在类 javax.management.MBeanFeatureInfo 中声明的方法
getDescription, getName
-
构造方法详细信息
-
ModelMBeanNotificationInfo
使用默认描述符构造一个 ModelMBeanNotificationInfo 对象。- 参数:
notifTypes
- 包含可能发出的通知类型的字符串数组(以点表示法)。name
- 通知类的名称。description
- 通知的人类可读描述。选修的。
-
ModelMBeanNotificationInfo
public ModelMBeanNotificationInfo(String [] notifTypes, String name, String description, Descriptor descriptor) 构造一个 ModelMBeanNotificationInfo 对象。- 参数:
notifTypes
- 包含可能发出的通知类型的字符串数组(以点表示法)。name
- 通知类的名称。description
- 通知的人类可读描述。选修的。descriptor
- Descriptor 的一个实例,包含此 MBeanNotificationInfo 实例的适当元数据。如果它为空,将创建一个默认描述符。如果描述符不包含字段“displayName”或“severity”,则添加缺失的字段及其默认值。- 抛出:
RuntimeOperationsException
- 包装一个IllegalArgumentException
。描述符无效,或者描述符字段“名称”不等于参数名称,或者描述符字段“descriptorType”不等于“通知”。
-
ModelMBeanNotificationInfo
从此 ModelMBeanNotfication 对象构造一个新的 ModelMBeanNotificationInfo 对象。- 参数:
inInfo
- 要复制的 ModelMBeanNotificationInfo
-
-
方法详情
-
clone
创建并返回一个新的 ModelMBeanNotificationInfo,它是此 ModelMBeanNotificationInfo 的副本。- 重写:
clone
在类MBeanNotificationInfo
中- 返回:
- 此实例的克隆。
- 参见:
-
getDescriptor
返回 ModelMBeanNotificationInfo 的关联描述符的副本。- 指定者:
getDescriptor
在接口DescriptorRead
中- 重写:
getDescriptor
在类MBeanFeatureInfo
中- 返回:
- 与 ModelMBeanNotificationInfo 对象关联的描述符。
- 参见:
-
setDescriptor
为 ModelMBeanNotificationInfo 设置关联的描述符(完全替换)如果新的描述符为空,则关联的描述符将恢复为默认描述符。描述符在分配之前经过验证。如果新的 Descriptor 无效,则抛出包含 IllegalArgumentException 的 RuntimeOperationsException。- 指定者:
setDescriptor
在接口DescriptorAccess
中- 参数:
inDescriptor
- 替换与 ModelMBeanNotification 接口关联的描述符- 抛出:
RuntimeOperationsException
- 为无效的描述符包装一个IllegalArgumentException
。- 参见:
-
toString
返回包含 ModelMBeanNotificationInfo 的人类可读字符串。
-