javax.management
Class AttributeChangeNotificationFilter

java.lang.Object
  extended byjavax.management.AttributeChangeNotificationFilter
All Implemented Interfaces:
NotificationFilter (src) , java.io.Serializable

public class AttributeChangeNotificationFilter
extends java.lang.Object
implements NotificationFilter (src) , java.io.Serializable

Notification filter support for attribute change notifications.

See Also:
AttributeChangeNotification (src) , NotificationFilter (src) , Serialized Form

Constructor Summary
AttributeChangeNotificationFilter()
          Constructs an attribute change notification filter.
 
Method Summary
 void disableAllAttributes()
          Disables all attribute change notifications.
 void disableAttribute(java.lang.String name)
          Disable the attribute change notifications of the given attribute.
 void enableAttribute(java.lang.String name)
          Enables the attribute change notifications of the given attribute to be sent to the listener.
 java.util.Vector getEnabledAttributes()
          Returns the names of the attributes whose notifications are allowed to pass this filter.
 boolean isNotificationEnabled(Notification (src)  notification)
          This method is called before a notification is sent to see whether the listener wants the notification.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeChangeNotificationFilter

public AttributeChangeNotificationFilter()
Constructs an attribute change notification filter. All attribute notifications are filtered by default. Use enableAttribute(java.lang.String) to enable notifications of a given attribute to pass this filter.

Method Detail

isNotificationEnabled

public boolean isNotificationEnabled(Notification (src)  notification)
Description copied from interface: NotificationFilter (src)
This method is called before a notification is sent to see whether the listener wants the notification.

Specified by:
isNotificationEnabled in interface NotificationFilter (src)
Parameters:
notification - the notification to be sent.
Returns:
true if the listener wants the notification, false otherwise

enableAttribute

public void enableAttribute(java.lang.String name)
                     throws java.lang.IllegalArgumentException
Enables the attribute change notifications of the given attribute to be sent to the listener.

Parameters:
name - name of the management attribute
Throws:
java.lang.IllegalArgumentException

disableAttribute

public void disableAttribute(java.lang.String name)
Disable the attribute change notifications of the given attribute. Attribute change notifications for this attribute will not be sent to the listener.

Parameters:
name - name of the management attribute

disableAllAttributes

public void disableAllAttributes()
Disables all attribute change notifications.


getEnabledAttributes

public java.util.Vector getEnabledAttributes()
Returns the names of the attributes whose notifications are allowed to pass this filter.

Returns:
a vector containing the name strings of the enabled attributes

toString

public java.lang.String toString()
Returns:
human readable string.