Top Description Fields Constructors Methods
javax.management.relation

public Class RelationNotification

extends Notification
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
javax.management.Notification, .ObjectName, java.io.InvalidObjectException, .IOException, .ObjectInputStream, .ObjectOutputStream, .ObjectStreamField, java.security.AccessController, java.util.ArrayList, .Arrays, .Collections, .HashSet, .List, .Set, com.sun.jmx.mbeanserver.GetPropertyAction

A notification of a change in the Relation Service. A RelationNotification notification is sent when a relation is created via the Relation Service, or an MBean is added as a relation in the Relation Service, or a role is updated in a relation, or a relation is removed from the Relation Service.

The serialVersionUID of this class is -6871117877523310399L.

Since
1.5

Field Summary

Modifier and TypeField and Description
private static boolean
private List<ObjectName>
private static final ObjectStreamField[]
private static final long
private List<ObjectName>
private static final ObjectStreamField[]
private static final long
public static final String
RELATION_BASIC_CREATION

Type for the creation of an internal relation.

public static final String
RELATION_BASIC_REMOVAL

Type for the removal from the Relation Service of an internal relation.

public static final String
RELATION_BASIC_UPDATE

Type for an update of an internal relation.

public static final String
RELATION_MBEAN_CREATION

Type for the relation MBean added into the Relation Service.

public static final String
RELATION_MBEAN_REMOVAL

Type for the removal from the Relation Service of a relation MBean.

public static final String
RELATION_MBEAN_UPDATE

Type for the update of a relation MBean.

private String
private ObjectName
private String
private String
private static final ObjectStreamField[]
private static final long
private List<ObjectName>
Inherited from javax.management.Notification:
source

Constructor Summary

AccessConstructor and Description
public
RelationNotification(String
type of the notification; either:

- RELATION_BASIC_CREATION

- RELATION_MBEAN_CREATION

- RELATION_BASIC_REMOVAL

- RELATION_MBEAN_REMOVAL

notifType
,
Object
source object, sending the notification. This is either an ObjectName or a RelationService object. In the latter case it must be the MBean emitting the notification; the MBean Server will rewrite the source to be the ObjectName under which that MBean is registered.
sourceObj
,
long
sequence number to identify the notification
sequence
,
long
time stamp
timeStamp
,
String
human-readable message describing the notification
message
,
String
relation id identifying the relation in the Relation Service
id
,
String
name of the relation type
typeName
,
ObjectName
ObjectName of the relation object if it is an MBean (null for relations internally handled by the Relation Service)
objectName
,
List<ObjectName>
list of ObjectNames of referenced MBeans expected to be unregistered due to relation removal (only for removal, due to CIM qualifiers, can be null)
unregMBeanList
)

Creates a notification for either a relation creation (RelationSupport object created internally in the Relation Service, or an MBean added as a relation) or for a relation removal from the Relation Service.

public
RelationNotification(String
type of the notification; either:

- RELATION_BASIC_UPDATE

- RELATION_MBEAN_UPDATE

notifType
,
Object
source object, sending the notification. This is either an ObjectName or a RelationService object. In the latter case it must be the MBean emitting the notification; the MBean Server will rewrite the source to be the ObjectName under which that MBean is registered.
sourceObj
,
long
sequence number to identify the notification
sequence
,
long
time stamp
timeStamp
,
String
human-readable message describing the notification
message
,
String
relation id identifying the relation in the Relation Service
id
,
String
name of the relation type
typeName
,
ObjectName
ObjectName of the relation object if it is an MBean (null for relations internally handled by the Relation Service)
objectName
,
String
name of the updated role
name
,
List<ObjectName>
new role value (List of ObjectName objects)
newValue
,
List<ObjectName>
old role value (List of ObjectName objects)
oldValue
)

Creates a notification for a role update in a relation.

Method Summary

Modifier and TypeMethod and Description
public List<ObjectName>

Returns:

a List of ObjectName.
getMBeansToUnregister
()

Returns the list of ObjectNames of MBeans expected to be unregistered due to a relation removal (only for relation removal).

public List<ObjectName>

Returns:

the new value of the updated role.
getNewRoleValue
()

Returns new value of updated role (only for role update).

public ObjectName

Returns:

the ObjectName if the relation is an MBean, otherwise null.
getObjectName
()

Returns the ObjectName of the created/removed/updated relation.

public List<ObjectName>

Returns:

the old value of the updated role.
getOldRoleValue
()

Returns old value of updated role (only for role update).

public String

Returns:

the relation id.
getRelationId
()

Returns the relation identifier of created/removed/updated relation.

public String

Returns:

the relation type name.
getRelationTypeName
()

Returns the relation type name of created/removed/updated relation.

public String

Returns:

the name of the updated role.
getRoleName
()

Returns name of updated role of updated relation (only for role update).

private boolean
isValidBasic(String notifType, Object sourceObj, String id, String typeName)

private boolean
isValidBasicStrict(String notifType, Object sourceObj, String id, String typeName)

private boolean
isValidCreate(String notifType)

private boolean
isValidUpdate(String notifType, String name, List<ObjectName> newValue, List<ObjectName> oldValue)

private void
private ObjectName
private ArrayList<ObjectName>
private void
Inherited from javax.management.Notification:
getMessagegetSequenceNumbergetTimeStampgetTypegetUserDatasetSequenceNumbersetSourcesetTimeStampsetUserDatatoString

Field Detail

compatback to summary
private static boolean compat

Hides javax.management.Notification.compat.

newRoleValueback to summary
private List<ObjectName> newRoleValue
newSerialPersistentFieldsback to summary
private static final ObjectStreamField[] newSerialPersistentFields

Hides javax.management.Notification.newSerialPersistentFields.

newSerialVersionUIDback to summary
private static final long newSerialVersionUID

Hides javax.management.Notification.newSerialVersionUID.

oldRoleValueback to summary
private List<ObjectName> oldRoleValue
oldSerialPersistentFieldsback to summary
private static final ObjectStreamField[] oldSerialPersistentFields

Hides javax.management.Notification.oldSerialPersistentFields.

oldSerialVersionUIDback to summary
private static final long oldSerialVersionUID

Hides javax.management.Notification.oldSerialVersionUID.

RELATION_BASIC_CREATIONback to summary
public static final String RELATION_BASIC_CREATION

Type for the creation of an internal relation.

RELATION_BASIC_REMOVALback to summary
public static final String RELATION_BASIC_REMOVAL

Type for the removal from the Relation Service of an internal relation.

RELATION_BASIC_UPDATEback to summary
public static final String RELATION_BASIC_UPDATE

Type for an update of an internal relation.

RELATION_MBEAN_CREATIONback to summary
public static final String RELATION_MBEAN_CREATION

Type for the relation MBean added into the Relation Service.

RELATION_MBEAN_REMOVALback to summary
public static final String RELATION_MBEAN_REMOVAL

Type for the removal from the Relation Service of a relation MBean.

RELATION_MBEAN_UPDATEback to summary
public static final String RELATION_MBEAN_UPDATE

Type for the update of a relation MBean.

relationIdback to summary
private String relationId
relationObjNameback to summary
private ObjectName relationObjName
relationTypeNameback to summary
private String relationTypeName
roleNameback to summary
private String roleName
serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields

Hides javax.management.Notification.serialPersistentFields.

Serial Fields:
relationId:String
Relation identifier of created/removed/updated relation
relationTypeName:String
Relation type name of created/removed/updated relation
relationObjName:ObjectName
ObjectName of the relation MBean of created/removed/updated relation (only if the relation is represented by an MBean)
unregisterMBeanList:List
List of ObjectNames of referenced MBeans to be unregistered due to relation removal
roleName:String
Name of updated role (only for role update)
oldRoleValue:List
Old role value (ArrayList of ObjectNames) (only for role update)
newRoleValue:List
New role value (ArrayList of ObjectNames) (only for role update)
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.management.Notification.serialVersionUID.

unregisterMBeanListback to summary
private List<ObjectName> unregisterMBeanList

Constructor Detail

RelationNotificationback to summary
public RelationNotification(String notifType, Object sourceObj, long sequence, long timeStamp, String message, String id, String typeName, ObjectName objectName, List<ObjectName> unregMBeanList) throws IllegalArgumentException

Creates a notification for either a relation creation (RelationSupport object created internally in the Relation Service, or an MBean added as a relation) or for a relation removal from the Relation Service.

Parameters
notifType:String

type of the notification; either:

- RELATION_BASIC_CREATION

- RELATION_MBEAN_CREATION

- RELATION_BASIC_REMOVAL

- RELATION_MBEAN_REMOVAL

sourceObj:Object

source object, sending the notification. This is either an ObjectName or a RelationService object. In the latter case it must be the MBean emitting the notification; the MBean Server will rewrite the source to be the ObjectName under which that MBean is registered.

sequence:long

sequence number to identify the notification

timeStamp:long

time stamp

message:String

human-readable message describing the notification

id:String

relation id identifying the relation in the Relation Service

typeName:String

name of the relation type

objectName:ObjectName

ObjectName of the relation object if it is an MBean (null for relations internally handled by the Relation Service)

unregMBeanList:List<ObjectName>

list of ObjectNames of referenced MBeans expected to be unregistered due to relation removal (only for removal, due to CIM qualifiers, can be null)

Exceptions
IllegalArgumentException:
if:

- no value for the notification type

- the notification type is not RELATION_BASIC_CREATION, RELATION_MBEAN_CREATION, RELATION_BASIC_REMOVAL or RELATION_MBEAN_REMOVAL

- no source object

- the source object is not a Relation Service

- no relation id

- no relation type name

RelationNotificationback to summary
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

Creates a notification for a role update in a relation.

Parameters
notifType:String

type of the notification; either:

- RELATION_BASIC_UPDATE

- RELATION_MBEAN_UPDATE

sourceObj:Object

source object, sending the notification. This is either an ObjectName or a RelationService object. In the latter case it must be the MBean emitting the notification; the MBean Server will rewrite the source to be the ObjectName under which that MBean is registered.

sequence:long

sequence number to identify the notification

timeStamp:long

time stamp

message:String

human-readable message describing the notification

id:String

relation id identifying the relation in the Relation Service

typeName:String

name of the relation type

objectName:ObjectName

ObjectName of the relation object if it is an MBean (null for relations internally handled by the Relation Service)

name:String

name of the updated role

newValue:List<ObjectName>

new role value (List of ObjectName objects)

oldValue:List<ObjectName>

old role value (List of ObjectName objects)

Exceptions
IllegalArgumentException:
if null parameter

Method Detail

getMBeansToUnregisterback to summary
public List<ObjectName> getMBeansToUnregister()

Returns the list of ObjectNames of MBeans expected to be unregistered due to a relation removal (only for relation removal).

Returns:List<ObjectName>

a List of ObjectName.

getNewRoleValueback to summary
public List<ObjectName> getNewRoleValue()

Returns new value of updated role (only for role update).

Returns:List<ObjectName>

the new value of the updated role.

getObjectNameback to summary
public ObjectName getObjectName()

Returns the ObjectName of the created/removed/updated relation.

Returns:ObjectName

the ObjectName if the relation is an MBean, otherwise null.

getOldRoleValueback to summary
public List<ObjectName> getOldRoleValue()

Returns old value of updated role (only for role update).

Returns:List<ObjectName>

the old value of the updated role.

getRelationIdback to summary
public String getRelationId()

Returns the relation identifier of created/removed/updated relation.

Returns:String

the relation id.

getRelationTypeNameback to summary
public String getRelationTypeName()

Returns the relation type name of created/removed/updated relation.

Returns:String

the relation type name.

getRoleNameback to summary
public String getRoleName()

Returns name of updated role of updated relation (only for role update).

Returns:String

the name of the updated role.

isValidBasicback to summary
private boolean isValidBasic(String notifType, Object sourceObj, String id, String typeName)
isValidBasicStrictback to summary
private boolean isValidBasicStrict(String notifType, Object sourceObj, String id, String typeName)
isValidCreateback to summary
private boolean isValidCreate(String notifType)
isValidUpdateback to summary
private boolean isValidUpdate(String notifType, String name, List<ObjectName> newValue, List<ObjectName> oldValue)
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Hides javax.management.Notification.readObject.

Deserializes a RelationNotification from an ObjectInputStream.

safeGetObjectNameback to summary
private ObjectName safeGetObjectName(ObjectName src)
safeGetObjectNameListback to summary
private ArrayList<ObjectName> safeGetObjectNameList(List<ObjectName> src)
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Hides javax.management.Notification.writeObject.

Serializes a RelationNotification to an ObjectOutputStream.