站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

NotificationFilterSupport (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management
Class NotificationFilterSupport

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

public class NotificationFilterSupport
extends Object
implements NotificationFilter, Serializable

An implementation of the NotificationFilter interface.

It filters on the notification type. It Maintains a list of enabled notification types. By default no notifications are enabled.

The enabled types are prefixes. That is a notification is enabled if it starts with an enabled string.

Version:
$Revision: 1.9.6.1 $
Author:
Adrian Brock., Dimitris Andreadis.
See Also:
Serialized Form

Constructor Summary
NotificationFilterSupport()
          Create a filter that filters out all notification types.
 
Method Summary
 void disableAllTypes()
          Disable all notification types.
 void disableType(String type)
          Disable a notification type.
 void enableType(String type)
          Enable a notification type.
 Vector getEnabledTypes()
          Get all the enabled notification types.
 boolean isNotificationEnabled(Notification notification)
          Test to see whether this notification is enabled
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotificationFilterSupport

public NotificationFilterSupport()
Create a filter that filters out all notification types.

Method Detail

disableAllTypes

public void disableAllTypes()
Disable all notification types. Rejects all notifications.


disableType

public void disableType(String type)
Disable a notification type.

Parameters:
type - the notification type to disable.

enableType

public void enableType(String type)
                throws IllegalArgumentException
Enable a notification type.

Parameters:
type - the notification type to enable.
Throws:
IllegalArgumentException - for a null type

getEnabledTypes

public Vector getEnabledTypes()
Get all the enabled notification types.

Returns a vector of enabled notification type.
An empty vector means all types disabled.

Returns:
the vector of enabled types.

toString

public String toString()
Returns:
human readable string.

isNotificationEnabled

public boolean isNotificationEnabled(Notification notification)
Test to see whether this notification is enabled

Specified by:
isNotificationEnabled in interface NotificationFilter
Parameters:
notification - the notification to filter
Returns:
true when the notification should be sent, false otherwise
Throws:
IllegalArgumentException - for null notification.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.