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

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


javax.management.relation
Class MBeanServerNotificationFilter

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

public class MBeanServerNotificationFilter
extends NotificationFilterSupport

A helper class, used to filter notifications of registration, unregistration of selected object names.

Version:
$Revision: 1.9 $

Revisions:

20020711 Adrian Brock:

  • Serialization
Author:
Adrian Brock.
See Also:
Serialized Form

Constructor Summary
MBeanServerNotificationFilter()
          Create a filter selecting nothing by default
 
Method Summary
 void disableAllObjectNames()
          Disable all object names.
 void disableObjectName(ObjectName objectName)
          Disable an object name.
 void enableAllObjectNames()
          Enable all object names.
 void enableObjectName(ObjectName objectName)
          Enable an object name.
 Vector getDisabledObjectNames()
          Get all the disabled object names.
 Vector getEnabledObjectNames()
          Get all the enabled object names.
 boolean isNotificationEnabled(Notification notification)
          Test to see whether this notification is enabled
 String toString()
           
 
Methods inherited from class javax.management.NotificationFilterSupport
disableAllTypes, disableType, enableType, getEnabledTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MBeanServerNotificationFilter

public MBeanServerNotificationFilter()
Create a filter selecting nothing by default

WARNING!! WARNING!! The spec says the MBeanServerNotificationFilter accepts everything by default. The RI does exactly the opposite. I follow the RI.

Method Detail

disableAllObjectNames

public void disableAllObjectNames()
Disable all object names. Rejects all notifications.


disableObjectName

public void disableObjectName(ObjectName objectName)
                       throws IllegalArgumentException
Disable an object name.

Parameters:
objectName - the object name to disable.
Throws:
IllegalArgumentException - for a null object name

enableAllObjectNames

public void enableAllObjectNames()
Enable all object names. Accepts all notifications.


enableObjectName

public void enableObjectName(ObjectName objectName)
                      throws IllegalArgumentException
Enable an object name.

Parameters:
objectName - the object name to enable.
Throws:
IllegalArgumentException - for a null object name

getDisabledObjectNames

public Vector getDisabledObjectNames()
Get all the disabled object names.

Returns a vector of disabled object names.
Null for all object names disabled. An empty vector means all object names enabled.

Returns:
the vector of disabled object names.

getEnabledObjectNames

public Vector getEnabledObjectNames()
Get all the enabled object names.

Returns a vector of enabled object names.
Null for all object names enabled. An empty vector means all object names disabled.

Returns:
the vector of enabled object names.

toString

public String toString()
Overrides:
toString in class NotificationFilterSupport
Returns:
human readable string.

isNotificationEnabled

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

Specified by:
isNotificationEnabled in interface NotificationFilter
Overrides:
isNotificationEnabled in class NotificationFilterSupport
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.