javax.management
Class AttributeChangeNotificationFilter

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.AttributeChangeNotificationFilter
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter

public class AttributeChangeNotificationFilter
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

This class implements of the NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter interface for the attribute change notification sample code for javax.management.AttributeChangeNotification definition code for javax.management.AttributeChangeNotification . The filtering is performed on the name of the observed attribute.

It manages a list of enabled attribute names. A method allows users to enable/disable as many attribute names as required.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
AttributeChangeNotificationFilter sample code for javax.management.AttributeChangeNotificationFilter.AttributeChangeNotificationFilter() definition code for javax.management.AttributeChangeNotificationFilter.AttributeChangeNotificationFilter() ()
           
 
Method Summary
 void disableAllAttributes sample code for javax.management.AttributeChangeNotificationFilter.disableAllAttributes() definition code for javax.management.AttributeChangeNotificationFilter.disableAllAttributes() ()
          Disables all the attribute names.
 void disableAttribute sample code for javax.management.AttributeChangeNotificationFilter.disableAttribute(java.lang.String) definition code for javax.management.AttributeChangeNotificationFilter.disableAttribute(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Disables all the attribute change notifications the attribute name of which equals the specified attribute name to be sent to the listener.
 void enableAttribute sample code for javax.management.AttributeChangeNotificationFilter.enableAttribute(java.lang.String) definition code for javax.management.AttributeChangeNotificationFilter.enableAttribute(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Enables all the attribute change notifications the attribute name of which equals the specified name to be sent to the listener.
 Vector sample code for java.util.Vector definition code for java.util.Vector getEnabledAttributes sample code for javax.management.AttributeChangeNotificationFilter.getEnabledAttributes() definition code for javax.management.AttributeChangeNotificationFilter.getEnabledAttributes() ()
          Gets all the enabled attribute names for this filter.
 boolean isNotificationEnabled sample code for javax.management.AttributeChangeNotificationFilter.isNotificationEnabled(javax.management.Notification) definition code for javax.management.AttributeChangeNotificationFilter.isNotificationEnabled(javax.management.Notification) (Notification sample code for javax.management.Notification definition code for javax.management.Notification  notification)
          Invoked before sending the specified notification to the listener.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

AttributeChangeNotificationFilter sample code for javax.management.AttributeChangeNotificationFilter() definition code for javax.management.AttributeChangeNotificationFilter()

public AttributeChangeNotificationFilter()
Method Detail

isNotificationEnabled sample code for javax.management.AttributeChangeNotificationFilter.isNotificationEnabled(javax.management.Notification) definition code for javax.management.AttributeChangeNotificationFilter.isNotificationEnabled(javax.management.Notification)

public boolean isNotificationEnabled(Notification sample code for javax.management.Notification definition code for javax.management.Notification  notification)
Invoked before sending the specified notification to the listener.
This filter compares the attribute name of the specified attribute change notification with each enabled attribute name. If the attribute name equals one of the enabled attribute names, the notification must be sent to the listener and this method returns true.

Specified by:
isNotificationEnabled sample code for javax.management.NotificationFilter.isNotificationEnabled(javax.management.Notification) definition code for javax.management.NotificationFilter.isNotificationEnabled(javax.management.Notification) in interface NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter
Parameters:
notification - The attribute change notification to be sent.
Returns:
true if the notification has to be sent to the listener, false otherwise.

enableAttribute sample code for javax.management.AttributeChangeNotificationFilter.enableAttribute(java.lang.String) definition code for javax.management.AttributeChangeNotificationFilter.enableAttribute(java.lang.String)

public void enableAttribute(String sample code for java.lang.String definition code for java.lang.String  name)
                     throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Enables all the attribute change notifications the attribute name of which equals the specified name to be sent to the listener.
If the specified name is already in the list of enabled attribute names, this method has no effect.

Parameters:
name - The attribute name.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - The attribute name parameter is null.

disableAttribute sample code for javax.management.AttributeChangeNotificationFilter.disableAttribute(java.lang.String) definition code for javax.management.AttributeChangeNotificationFilter.disableAttribute(java.lang.String)

public void disableAttribute(String sample code for java.lang.String definition code for java.lang.String  name)
Disables all the attribute change notifications the attribute name of which equals the specified attribute name to be sent to the listener.
If the specified name is not in the list of enabled attribute names, this method has no effect.

Parameters:
name - The attribute name.

disableAllAttributes sample code for javax.management.AttributeChangeNotificationFilter.disableAllAttributes() definition code for javax.management.AttributeChangeNotificationFilter.disableAllAttributes()

public void disableAllAttributes()
Disables all the attribute names.


getEnabledAttributes sample code for javax.management.AttributeChangeNotificationFilter.getEnabledAttributes() definition code for javax.management.AttributeChangeNotificationFilter.getEnabledAttributes()

public Vector sample code for java.util.Vector definition code for java.util.Vector  getEnabledAttributes()
Gets all the enabled attribute names for this filter.

Returns:
The list containing all the enabled attribute names.