Class RelationNotification
java.lang.Object
java.util.EventObject
javax.management.Notification
javax.management.relation.RelationNotification
- All Implemented Interfaces:
Serializable
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
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringType for the creation of an internal relation.static final StringType for the removal from the Relation Service of an internal relation.static final StringType for an update of an internal relation.static final StringType for the relation MBean added into the Relation Service.static final StringType for the removal from the Relation Service of a relation MBean.static final StringType for the update of a relation MBean.Fields declared in class Notification
sourceModifier and TypeFieldDescriptionprotected ObjectThis field hides theEventObject.sourcefield in the parent class to make it non-transient and therefore part of the serialized form. -
Constructor Summary
ConstructorsConstructorDescriptionRelationNotification(String notifType, Object sourceObj, long sequence, long timeStamp, String message, String id, String typeName, ObjectName objectName, String name, List<ObjectName> newValue, List<ObjectName> oldValue) Creates a notification for a role update in a relation.RelationNotification(String notifType, Object sourceObj, long sequence, long timeStamp, String message, String id, String typeName, ObjectName objectName, List<ObjectName> 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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of ObjectNames of MBeans expected to be unregistered due to a relation removal (only for relation removal).Returns new value of updated role (only for role update).Returns the ObjectName of the created/removed/updated relation.Returns old value of updated role (only for role update).Returns the relation identifier of created/removed/updated relation.Returns the relation type name of created/removed/updated relation.Returns name of updated role of updated relation (only for role update).Methods declared in class Notification
getMessage, getSequenceNumber, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toStringModifier and TypeMethodDescriptionGet the notification message.longGet the notification sequence number.longGet the notification timestamp.getType()Get the notification type.Get the user data.voidsetSequenceNumber(long sequenceNumber) Set the notification sequence number.voidSets the source.voidsetTimeStamp(long timeStamp) Set the notification timestamp.voidsetUserData(Object userData) Set the user data.toString()Returns a String representation of this notification.Methods declared in class EventObject
getSourceMethods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Field Details
-
RELATION_BASIC_CREATION
Type for the creation of an internal relation.- See Also:
-
RELATION_MBEAN_CREATION
Type for the relation MBean added into the Relation Service.- See Also:
-
RELATION_BASIC_UPDATE
Type for an update of an internal relation.- See Also:
-
RELATION_MBEAN_UPDATE
-
RELATION_BASIC_REMOVAL
Type for the removal from the Relation Service of an internal relation.- See Also:
-
RELATION_MBEAN_REMOVAL
Type for the removal from the Relation Service of a relation MBean.- See Also:
-
-
Constructor Details
-
RelationNotification
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- type of the notification; either:- RELATION_BASIC_CREATION
- RELATION_MBEAN_CREATION
- RELATION_BASIC_REMOVAL
- RELATION_MBEAN_REMOVAL
sourceObj- 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- sequence number to identify the notificationtimeStamp- time stampmessage- human-readable message describing the notificationid- relation id identifying the relation in the Relation ServicetypeName- name of the relation typeobjectName- ObjectName of the relation object if it is an MBean (null for relations internally handled by the Relation Service)unregMBeanList- list of ObjectNames of referenced MBeans expected to be unregistered due to relation removal (only for removal, due to CIM qualifiers, can be null)- Throws:
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
-
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 Creates a notification for a role update in a relation.- Parameters:
notifType- type of the notification; either:- RELATION_BASIC_UPDATE
- RELATION_MBEAN_UPDATE
sourceObj- 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- sequence number to identify the notificationtimeStamp- time stampmessage- human-readable message describing the notificationid- relation id identifying the relation in the Relation ServicetypeName- name of the relation typeobjectName- ObjectName of the relation object if it is an MBean (null for relations internally handled by the Relation Service)name- name of the updated rolenewValue- new role value (List of ObjectName objects)oldValue- old role value (List of ObjectName objects)- Throws:
IllegalArgumentException- if null parameter
-
-
Method Details
-
getRelationId
Returns the relation identifier of created/removed/updated relation.- Returns:
- the relation id.
-
getRelationTypeName
Returns the relation type name of created/removed/updated relation.- Returns:
- the relation type name.
-
getObjectName
Returns the ObjectName of the created/removed/updated relation.- Returns:
- the ObjectName if the relation is an MBean, otherwise null.
-
getMBeansToUnregister
Returns the list of ObjectNames of MBeans expected to be unregistered due to a relation removal (only for relation removal).- Returns:
- a
ListofObjectName.
-
getRoleName
Returns name of updated role of updated relation (only for role update).- Returns:
- the name of the updated role.
-
getOldRoleValue
Returns old value of updated role (only for role update).- Returns:
- the old value of the updated role.
-
getNewRoleValue
Returns new value of updated role (only for role update).- Returns:
- the new value of the updated role.
-