javax.management

Class AttributeChangeNotificationFilter

public class AttributeChangeNotificationFilter extends Object implements NotificationFilter, Serializable

Performs filtering of AttributeChangeNotifications based on a list of attribute names.

Since: 1.5

Method Summary
voiddisableAllAttributes()
Blocks all AttributeChangeNotifications by emptying the list of enabled attributes.
voiddisableAttribute(String name)
Removes the specified attribute name from the list of enabled attributes, thus preventing AttributeChangeNotifications for this attribute from passing through the filter.
voidenableAttribute(String name)
Adds the specified attribute name to the list of enabled attributes, thus allowing AttributeChangeNotifications for this attribute to pass through the filter.
Vector<String>getEnabledAttributes()
Returns the list of enabled attributes for this filter.
booleanisNotificationEnabled(Notification notif)
Returns true if the specified notification is an AttributeChangeNotification and the name of the attribute concerned is in the list of enabled attributes for this filter.

Method Detail

disableAllAttributes

public void disableAllAttributes()
Blocks all AttributeChangeNotifications by emptying the list of enabled attributes.

disableAttribute

public void disableAttribute(String name)
Removes the specified attribute name from the list of enabled attributes, thus preventing AttributeChangeNotifications for this attribute from passing through the filter. If the attribute is not enabled, this has no effect.

Parameters: name the name of the attribute to disable.

enableAttribute

public void enableAttribute(String name)
Adds the specified attribute name to the list of enabled attributes, thus allowing AttributeChangeNotifications for this attribute to pass through the filter. If the attribute is enabled, this has no effect.

Parameters: name the name of the attribute to enable.

getEnabledAttributes

public Vector<String> getEnabledAttributes()
Returns the list of enabled attributes for this filter.

Returns: the list of enabled attributes.

isNotificationEnabled

public boolean isNotificationEnabled(Notification notif)
Returns true if the specified notification is an AttributeChangeNotification and the name of the attribute concerned is in the list of enabled attributes for this filter.

Parameters: notif the notification being filtered.

Returns: true if the notification is an AttributeChangeNotification for an enabled attribute.