Class RelationSetNotificationFilter

java.lang.Object
com.caplin.management.jmx.relations.RelationSetNotificationFilter
All Implemented Interfaces:
Serializable, NotificationFilter

public class RelationSetNotificationFilter extends Object implements NotificationFilter

Implementation of the NotificationFilter interface that filters out all Notifications that do not apply to a specific RelationSet.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    RelationSetNotificationFilter(ObjectName sourceObjectName, String attributeName, boolean notifyOfAddedElements, boolean notifyOfRemovedElements)
    Constructs the NotificationFitler with the specified source ObjectName, attribute name and notify of added and/or removed element booleans.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Compares this RelationSetNotificationFilter to another one.
    int
    Returns a hash code value for the object.
    boolean
    Determines whether the specified notification is enabled by this filter or not.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RelationSetNotificationFilter

      public RelationSetNotificationFilter(ObjectName sourceObjectName, String attributeName, boolean notifyOfAddedElements, boolean notifyOfRemovedElements)

      Constructs the NotificationFitler with the specified source ObjectName, attribute name and notify of added and/or removed element booleans.

      Parameters:
      sourceObjectName - The ObjectName of the MBean that RelationSetNotifications should be enabled for.
      attributeName - The name of the attribute that RelationSetNotifications should be enabled for.
      notifyOfAddedElements - Whether element added notifications should be enabled or not.
      notifyOfRemovedElements - Whether element removed notifications should be enabled or not.
      Throws:
      IllegalArgumentException - If either the sourceObjectName or attributeName arguments are null.
  • Method Details

    • isNotificationEnabled

      public boolean isNotificationEnabled(Notification notification)

      Determines whether the specified notification is enabled by this filter or not.

      Specified by:
      isNotificationEnabled in interface NotificationFilter
      Returns:
      true if the specicified notification is a RelationSetNotification, the source of the notification was the same as the source ObjectName specified within this filter's constructor, the attribute the notification is for is the same as the attribute specified within the filter's constructor, and the notification type (element added or removed) is compatible with the respective added/removed booleans specified in the filter's constructor. Otherwise false.

    • equals

      public boolean equals(Object object)

      Compares this RelationSetNotificationFilter to another one.

      Overrides:
      equals in class Object
      Parameters:
      object - The object to be compared against.
      Returns:
      true if the specified object is a RelationSetNotificationFilter and its sourceObjectName, attributeName, notifyOfAddedElements and notifyOfRemovedElements values are equal to those of this RelationSetNotificationFilter.
    • hashCode

      public int hashCode()

      Returns a hash code value for the object.

      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this object.