JavaTM Platform
Standard Ed. 6

javax.management.relation
类 RelationNotification

java.lang.Object
  继承者 java.util.EventObject
      继承者 javax.management.Notification
          继承者 javax.management.relation.RelationNotification
所有已实现的接口:
Serializable

public class RelationNotification
extends Notification

Relation Service(关系服务)中的更改通知。当通过 Relation Service 创建关系时,或者在 Relation Service 中作为关系添加 MBean 时,或者在关系中更新角色时,或者从 Relation Service 移除关系时,将发送 RelationNotification 通知。

此类的 serialVersionUID-6871117877523310399L

从以下版本开始:
1.5
另请参见:
序列化表格

字段摘要
static String RELATION_BASIC_CREATION
          内部关系的创建类型。
static String RELATION_BASIC_REMOVAL
          从内部关系的 Relation Service 中移除的类型。
static String RELATION_BASIC_UPDATE
          内部关系的更新类型。
static String RELATION_MBEAN_CREATION
          添加到 Relation Service 中的关系 MBean 的类型。
static String RELATION_MBEAN_REMOVAL
          从关系 MBean 的 Relation Service 中移除的类型。
static String RELATION_MBEAN_UPDATE
          关系 MBean 的更新类型。
 
从类 javax.management.Notification 继承的字段
source
 
构造方法摘要
RelationNotification(String notifType, Object sourceObj, long sequence, long timeStamp, String message, String id, String typeName, ObjectName objectName, List<ObjectName> unregMBeanList)
          创建一个关系创建通知(在 Relation Service 中内部创建的 RelationSupport 对象,或者作为关系添加的 MBean),或创建一个从 Relation Service 进行关系移除的通知。
RelationNotification(String notifType, Object sourceObj, long sequence, long timeStamp, String message, String id, String typeName, ObjectName objectName, String name, List<ObjectName> newValue, List<ObjectName> oldValue)
          为关系中的角色更新创建通知。
 
方法摘要
 List<ObjectName> getMBeansToUnregister()
          返回因为关系移除而需要注销的 MBean 的 ObjectName 列表(仅限于关系移除)。
 List<ObjectName> getNewRoleValue()
          返回更新的角色的新值(仅限于角色更新)。
 ObjectName getObjectName()
          返回创建/移除/更新的关系的 ObjectName。
 List<ObjectName> getOldRoleValue()
          返回更新的角色的旧值(仅限于角色更新)。
 String getRelationId()
          返回创建/移除/更新的关系的关系标识符。
 String getRelationTypeName()
          返回创建/移除/更新的关系的关系类型名称。
 String getRoleName()
          返回更新关系的更新角色的名称(仅限于角色更新)。
 
从类 javax.management.Notification 继承的方法
getMessage, getSequenceNumber, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toString
 
从类 java.util.EventObject 继承的方法
getSource
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

RELATION_BASIC_CREATION

public static final String RELATION_BASIC_CREATION
内部关系的创建类型。

另请参见:
常量字段值

RELATION_MBEAN_CREATION

public static final String RELATION_MBEAN_CREATION
添加到 Relation Service 中的关系 MBean 的类型。

另请参见:
常量字段值

RELATION_BASIC_UPDATE

public static final String RELATION_BASIC_UPDATE
内部关系的更新类型。

另请参见:
常量字段值

RELATION_MBEAN_UPDATE

public static final String RELATION_MBEAN_UPDATE
关系 MBean 的更新类型。

另请参见:
常量字段值

RELATION_BASIC_REMOVAL

public static final String RELATION_BASIC_REMOVAL
从内部关系的 Relation Service 中移除的类型。

另请参见:
常量字段值

RELATION_MBEAN_REMOVAL

public static final String RELATION_MBEAN_REMOVAL
从关系 MBean 的 Relation Service 中移除的类型。

另请参见:
常量字段值
构造方法详细信息

RelationNotification

public RelationNotification(String notifType,
                            Object sourceObj,
                            long sequence,
                            long timeStamp,
                            String message,
                            String id,
                            String typeName,
                            ObjectName objectName,
                            List<ObjectName> unregMBeanList)
                     throws IllegalArgumentException
创建一个关系创建通知(在 Relation Service 中内部创建的 RelationSupport 对象,或者作为关系添加的 MBean),或创建一个从 Relation Service 进行关系移除的通知。

参数:
notifType - 通知的类型;以下几种皆可:

- RELATION_BASIC_CREATION

- RELATION_MBEAN_CREATION

- RELATION_BASIC_REMOVAL

- RELATION_MBEAN_REMOVAL

sourceObj - 发送通知的源对象。此参数要么是 ObjectName 对象,要么是 RelationService 对象。在后一种情况下,它必须是发出通知的 MBean;MBean Server 将把源对象重写为注册 MBean 的 ObjectName。
sequence - 要标识通知的序列号
timeStamp - 时间戳
message - 描述通知的可读消息
id - 在 Relation Service 中标识关系的关系 id
typeName - 关系类型的名称
objectName - 如果它是 MBean,则是该关系对象的 ObjectName(对于由 Relation Service 内部处理的关系,则为 null)
unregMBeanList - 因为关系移除而需要注销的引用 MBean 的 ObjectName 列表(仅限于因 CIM 限定符进行的移除,可以为 null)
抛出:
IllegalArgumentException - 如果:

- 通知类型没有值

- 通知类型不是 RELATION_BASIC_CREATION、RELATION_MBEAN_CREATION、RELATION_BASIC_REMOVAL 或 RELATION_MBEAN_REMOVAL

- 没有源对象

- 源对象不是 Relation Service

- 没有关系 id

- 没有关系类型名称


RelationNotification

public RelationNotification(String notifType,
                            Object sourceObj,
                            long sequence,
                            long timeStamp,
                            String message,
                            String id,
                            String typeName,
                            ObjectName objectName,
                            String name,
                            List<ObjectName> newValue,
                            List<ObjectName> oldValue)
                     throws IllegalArgumentException
为关系中的角色更新创建通知。

参数:
notifType - 通知的类型;以下几种皆可:

- RELATION_BASIC_UPDATE

- RELATION_MBEAN_UPDATE

sourceObj - 发送通知的源对象。此参数要么是 ObjectName 对象,要么是 RelationService 对象。在后一种情况下,它必须是发出通知的 MBean;MBean Server 将把源对象重写为注册 MBean 的 ObjectName。
sequence - 要标识通知的序列号
timeStamp - 时间戳
message - 描述通知的可读消息
id - 在 Relation Service 中标识关系的关系 id
typeName - 关系类型的名称
objectName - 如果它是 MBean,则是该关系对象的 ObjectName(对于由 Relation Service 内部处理的关系,则为 null)
name - 更新的角色名称
newValue - 新角色值(ObjectName 对象的列表)
oldValue - 旧角色值(ObjectName 对象的列表)
抛出:
IllegalArgumentException - 如果是 null 参数
方法详细信息

getRelationId

public String getRelationId()
返回创建/移除/更新的关系的关系标识符。

返回:
关系 id。

getRelationTypeName

public String getRelationTypeName()
返回创建/移除/更新的关系的关系类型名称。

返回:
关系类型名称。

getObjectName

public ObjectName getObjectName()
返回创建/移除/更新的关系的 ObjectName。

返回:
如果关系是 MBean,则返回 ObjectName;否则返回 null。

getMBeansToUnregister

public List<ObjectName> getMBeansToUnregister()
返回因为关系移除而需要注销的 MBean 的 ObjectName 列表(仅限于关系移除)。

返回:
ObjectNameList

getRoleName

public String getRoleName()
返回更新关系的更新角色的名称(仅限于角色更新)。

返回:
更新的角色名称。

getOldRoleValue

public List<ObjectName> getOldRoleValue()
返回更新的角色的旧值(仅限于角色更新)。

返回:
更新的角色的旧值。

getNewRoleValue

public List<ObjectName> getNewRoleValue()
返回更新的角色的新值(仅限于角色更新)。

返回:
更新的角色的新值。

JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策