Class RelationSetNotification

java.lang.Object
java.util.EventObject
javax.management.Notification
com.caplin.management.jmx.relations.RelationSetNotification
All Implemented Interfaces:
Serializable

public class RelationSetNotification extends Notification

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:
  • Field Details

    • ELEMENT_ADDED

      public static final 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:
    • ELEMENT_REMOVED

      public static final 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:
  • 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 the elementValue argument.
      Throws:
      IllegalArgumentException - If the type, source, elementName, elementValue or elementType arguments are null.
  • Method Details

    • getAttributeName

      public 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 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 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().