javax.management
Class AttributeChangeNotificationFilter

java.lang.Object
  |
  +--javax.management.AttributeChangeNotificationFilter
All Implemented Interfaces:
NotificationFilter, java.io.Serializable

public class AttributeChangeNotificationFilter
extends java.lang.Object
implements NotificationFilter

Provides a filter for the AttributeChangeNotification.

Version:
$Revision: 1.7 $
Author:
Simone Bordet
See Also:
Serialized Form

Constructor Summary
AttributeChangeNotificationFilter()
           
 
Method Summary
 void disableAllAttributes()
          Disable all attribute notifications
 void disableAttribute(java.lang.String name)
          Disables the given attribute.
 void enableAttribute(java.lang.String name)
          Enable the Notification for the given attribute name.
 boolean equals(java.lang.Object obj)
          Checks the given object for equality.
 java.util.Vector getEnabledAttributes()
          Returns the list of all enabled attributes for notification.
 int hashCode()
          Returns the hashCode.
 boolean isNotificationEnabled(Notification notification)
          Checks if the given Notification is enabled.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeChangeNotificationFilter

public AttributeChangeNotificationFilter()
Method Detail

hashCode

public int hashCode()
Returns the hashCode.
Overrides:
hashCode in class java.lang.Object
Returns:
int The hashCode

equals

public boolean equals(java.lang.Object obj)
Checks the given object for equality.
Overrides:
equals in class java.lang.Object
Returns:
boolean true if equal, false otherwise.

enableAttribute

public void enableAttribute(java.lang.String name)
Enable the Notification for the given attribute name.
Parameters:
name - The name of the attribute to be enabled.
Throws:
RuntimeOperationException - Wraps an IllegalArgumentException when the value of the given name is null.

disableAttribute

public void disableAttribute(java.lang.String name)
Disables the given attribute.

Note: This ignores operation when the given name is null.

Parameters:
name - The attribute name to be disabled.

disableAllAttributes

public void disableAllAttributes()
Disable all attribute notifications

getEnabledAttributes

public java.util.Vector getEnabledAttributes()
Returns the list of all enabled attributes for notification.
Returns:
Vector A new Vector containing the attributes for notifications

isNotificationEnabled

public boolean isNotificationEnabled(Notification notification)
Checks if the given Notification is enabled.

The notification needs to be an instance of AttributeChangeNotification It checks the attribute name and checked it against the enabled attributes contained in this filter.

Specified by:
isNotificationEnabled in interface NotificationFilter
Returns:
boolean if Notification is enabled for the given AttributeChangeNotification, false otherwise.


Copyright © 2001-2002 MX4J Team. All Rights Reserved.