Class RelationSetNotification
- java.lang.Object
-
- java.util.EventObject
-
- javax.management.Notification
-
- com.caplin.management.jmx.relations.RelationSetNotification
-
- All Implemented Interfaces:
java.io.Serializable
public class RelationSetNotification extends javax.management.Notification
Represents a change to the state of a
RelationSet
. A RelationSetNotification with anELEMENT_ADDED
type will be emitted if an element has been added to the RelationSet, whilst anELEMENT_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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RelationSetNotification.NotificationType
A type safe enumeration representation of the different possible types of RelationSet notifications.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELEMENT_ADDED
Notification type which indicates that an element has been added to the observedRelationSet
attribute.static java.lang.String
ELEMENT_REMOVED
Notification type which indicates that an element has been removed from the observedRelationSet
attribute.
-
Constructor Summary
Constructors Constructor Description RelationSetNotification(RelationSetNotification.NotificationType type, java.lang.Object source, long sequenceNumber, java.lang.String message, java.lang.String attributeName, java.lang.Object elementValue, java.lang.String elementType)
Constructs the notification with the required arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAttributeName()
Gets the name of the attribute that this notification applies to.java.lang.String
getElementType()
Gets the fully qualified class name of the object returned bygetElementValue()
.java.lang.Object
getElementValue()
Gets the object that represents the element that was added to or removed from theRelationSet
.
-
-
-
Field Detail
-
ELEMENT_ADDED
public static final java.lang.String 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:
- Constant Field Values
-
ELEMENT_REMOVED
public static final java.lang.String 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:
- Constant Field Values
-
-
Constructor Detail
-
RelationSetNotification
public RelationSetNotification(RelationSetNotification.NotificationType type, java.lang.Object source, long sequenceNumber, java.lang.String message, java.lang.String attributeName, java.lang.Object elementValue, java.lang.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:
java.lang.IllegalArgumentException
- If the type, source, elementName, elementValue or elementType arguments are null.
-
-
Method Detail
-
getAttributeName
public java.lang.String getAttributeName()
Gets the name of the attribute that this notification applies to.
- Returns:
- The name of the attribute that this notification applies to.
-
getElementValue
public java.lang.Object 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
public java.lang.String 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()
.
-
-