Class RelationSetNotificationFilter
java.lang.Object
com.caplin.management.jmx.relations.RelationSetNotificationFilter
- All Implemented Interfaces:
Serializable
,NotificationFilter
Implementation of the NotificationFilter
interface that filters out
all Notifications that do not apply to a specific RelationSet.
- See Also:
-
Constructor Summary
ConstructorDescriptionRelationSetNotificationFilter
(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 TypeMethodDescriptionboolean
Compares this RelationSetNotificationFilter to another one.int
hashCode()
Returns a hash code value for the object.boolean
isNotificationEnabled
(Notification notification) Determines whether the specified notification is enabled by this filter or not.
-
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 arenull
.
-
-
Method Details
-
isNotificationEnabled
Determines whether the specified notification is enabled by this filter or not.
- Specified by:
isNotificationEnabled
in interfaceNotificationFilter
- Returns:
true
if the specicified notification is aRelationSetNotification
, 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. Otherwisefalse
.
-
equals
Compares this RelationSetNotificationFilter to another one.
- Overrides:
equals
in classObject
- Parameters:
object
- The object to be compared against.- Returns:
true
if the specified object is a RelationSetNotificationFilter and itssourceObjectName
,attributeName
,notifyOfAddedElements
andnotifyOfRemovedElements
values are equal to those of this RelationSetNotificationFilter.
-
hashCode
public int hashCode()Returns a hash code value for the object.
-