Class RelationSetNotification
- All Implemented Interfaces:
Serializable
Represents a change to the state of a RelationSet
.
A RelationSetNotification with an ELEMENT_ADDED
type will be emitted if an element has
been added to the RelationSet, whilst an ELEMENT_REMOVED
type will be used if an
element has been removed. The name of the RelationSet attribute, along with the value and type
of the element that has been added or removed, will also be available.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A type safe enumeration representation of the different possible types of RelationSet notifications. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Notification type which indicates that an element has been added to the observedRelationSet
attribute.static final String
Notification type which indicates that an element has been removed from the observedRelationSet
attribute.Fields inherited from class javax.management.Notification
source
-
Constructor Summary
ConstructorDescriptionRelationSetNotification
(RelationSetNotification.NotificationType type, Object source, long sequenceNumber, String message, String attributeName, Object elementValue, String elementType) Constructs the notification with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the attribute that this notification applies to.Gets the fully qualified class name of the object returned bygetElementValue()
.Gets the object that represents the element that was added to or removed from theRelationSet
.Methods inherited from class javax.management.Notification
getMessage, getSequenceNumber, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toString
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
ELEMENT_ADDED
Notification type which indicates that an element has been added to the observed
RelationSet
attribute.The value of this type string is
caplin.relationset.element.added
.- See Also:
-
ELEMENT_REMOVED
Notification type which indicates that an element has been removed from the observed
RelationSet
attribute.The value of this type string is
caplin.relationset.element.removed
.- See Also:
-
-
Constructor Details
-
RelationSetNotification
public RelationSetNotification(RelationSetNotification.NotificationType type, Object source, long sequenceNumber, String message, String attributeName, Object elementValue, String elementType) Constructs the notification with the required arguments.
- Parameters:
type
- The type of the notification (i.e. element added or removed).source
- The source of the notification. This should be the ObjectName of the MBean that omitted the notification.sequenceNumber
- The notification sequence number within the source object.message
- The detailed message.attributeName
- The name of the attribute that this notification applies to.elementValue
- An object that represents the element that was added to or removed from the RelationSet.elementType
- The fully qualified class name of the object specified for theelementValue
argument.- Throws:
IllegalArgumentException
- If the type, source, elementName, elementValue or elementType arguments are null.
-
-
Method Details
-
getAttributeName
Gets the name of the attribute that this notification applies to.
- Returns:
- The name of the attribute that this notification applies to.
-
getElementValue
Gets the object that represents the element that was added to or removed from the
RelationSet
.- Returns:
- The object that represents the element that was added to or removed from the RelationSet.
-
getElementType
Gets the fully qualified class name of the object returned by
getElementValue()
.- Returns:
- The fully qualified class name of the object returned by
getElementValue()
.
-