APIdia Launch Partner
Top Description Fields Constructors Methods
javax.management

public Class AttributeChangeNotificationFilter

extends Object
implements NotificationFilter
Class Inheritance
All Implemented Interfaces
javax.management.NotificationFilter, java.io.Serializable
Imports
java.util.Vector

This class implements of the NotificationFilter interface for the attribute change notification. 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

Field Summary

Modifier and TypeField and Description
private Vector<String>
private static final long

Constructor Summary

AccessConstructor and Description
public
AttributeChangeNotificationFilter()

Constructs an AttributeChangeNotificationFilter.

Method Summary

Modifier and TypeMethod and Description
public synchronized void
disableAllAttributes()

Disables all the attribute names.

public synchronized void
disableAttribute(String
The attribute name.
name
)

Disables all the attribute change notifications the attribute name of which equals the specified attribute name to be sent to the listener.

public synchronized void
enableAttribute(String
The attribute name.
name
)

Enables all the attribute change notifications the attribute name of which equals the specified name to be sent to the listener.

public synchronized Vector<String>

Returns:

The list containing all the enabled attribute names.
getEnabledAttributes
()

Gets all the enabled attribute names for this filter.

public synchronized boolean

Returns:

true if the notification has to be sent to the listener, false otherwise.
isNotificationEnabled
(Notification
The attribute change notification to be sent.
notification
)

Implements javax.management.NotificationFilter.isNotificationEnabled.

Invoked before sending the specified notification to the listener.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enabledAttributesback to summary
private Vector<String> enabledAttributes
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AttributeChangeNotificationFilterback to summary
public AttributeChangeNotificationFilter()

Constructs an AttributeChangeNotificationFilter.

Method Detail

disableAllAttributesback to summary
public synchronized void disableAllAttributes()

Disables all the attribute names.

disableAttributeback to summary
public synchronized void disableAttribute(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:String

The attribute name.

enableAttributeback to summary
public synchronized void enableAttribute(String name) throws 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:String

The attribute name.

Exceptions
IllegalArgumentException:
The attribute name parameter is null.
getEnabledAttributesback to summary
public synchronized Vector<String> getEnabledAttributes()

Gets all the enabled attribute names for this filter.

Returns:Vector<String>

The list containing all the enabled attribute names.

isNotificationEnabledback to summary
public synchronized boolean isNotificationEnabled(Notification notification)

Implements javax.management.NotificationFilter.isNotificationEnabled.

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.

Parameters
notification:Notification

The attribute change notification to be sent.

Returns:boolean

true if the notification has to be sent to the listener, false otherwise.