Class NotificationFilterSupport

java.lang.Object
javax.management.NotificationFilterSupport
All Implemented Interfaces:
Serializable, NotificationFilter
Direct Known Subclasses:
MBeanServerNotificationFilter

public class NotificationFilterSupport extends Object implements NotificationFilter
Provides an implementation of the NotificationFilter interface. The filtering is performed on the notification type attribute.

Manages a list of enabled notification types. A method allows users to enable/disable as many notification types as required.

Then, before sending a notification to a listener registered with a filter, the notification broadcaster compares this notification type with all notification types enabled by the filter. The notification will be sent to the listener only if its filter enables this notification type.

Example:

 NotificationFilterSupport myFilter = new NotificationFilterSupport();
 myFilter.enableType("my_example.my_type");
 myBroadcaster.addListener(myListener, myFilter, null);
 
The listener myListener will only receive notifications the type of which equals/starts with "my_example.my_type".

Since:
1.5
See Also: