Class RelationSetNotificationFilter
- java.lang.Object
-
- com.caplin.management.jmx.relations.RelationSetNotificationFilter
-
- All Implemented Interfaces:
java.io.Serializable
,javax.management.NotificationFilter
public class RelationSetNotificationFilter extends java.lang.Object implements javax.management.NotificationFilter
Implementation of the
NotificationFilter
interface that filters out all Notifications that do not apply to a specific RelationSet.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RelationSetNotificationFilter(javax.management.ObjectName sourceObjectName, java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Compares this RelationSetNotificationFilter to another one.int
hashCode()
Returns a hash code value for the object.boolean
isNotificationEnabled(javax.management.Notification notification)
Determines whether the specified notification is enabled by this filter or not.
-
-
-
Constructor Detail
-
RelationSetNotificationFilter
public RelationSetNotificationFilter(javax.management.ObjectName sourceObjectName, java.lang.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:
java.lang.IllegalArgumentException
- If either the sourceObjectName or attributeName arguments arenull
.
-
-
Method Detail
-
isNotificationEnabled
public boolean isNotificationEnabled(javax.management.Notification notification)
Determines whether the specified notification is enabled by this filter or not.
- Specified by:
isNotificationEnabled
in interfacejavax.management.NotificationFilter
- 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
public boolean equals(java.lang.Object object)
Compares this RelationSetNotificationFilter to another one.
- Overrides:
equals
in classjava.lang.Object
- 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.
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code value for this object.
-
-