IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
 
[Sommaire]  [Top 50]  [F.A.Q.]  [ Java SE ]  [ Java EE ]  [Javadoc standard]  [Contact]
[ 1.4.2 ]  [ 5.0 ]  [ 6.0
Rechercher   
Dans
Options   sensible à la casse
étendre la recherche aux descriptions
Préférences
fr en 
 
Moteurs de recherche
JavaTM 2 Platform Std. Ed. v1.5.0

javax.management.relation
Class MBeanServerNotificationFilter

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

public class MBeanServerNotificationFilter
extends NotificationFilterSupport

Filter for MBeanServerNotification. This filter filters MBeanServerNotification notifications by selecting the ObjectNames of interest and the operations (registration, unregistration, both) of interest (corresponding to notification types).

Since:
1.5
See Also:
Serialized Form

Constructor Summary
MBeanServerNotificationFilter()
          Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.
 
Method Summary
 void disableAllObjectNames()
          Disables any MBeanServerNotification (all ObjectNames are deselected).
 void disableObjectName(ObjectName theObjName)
          Disables MBeanServerNotifications concerning given ObjectName.
 void enableAllObjectNames()
          Enables all MBeanServerNotifications (all ObjectNames are selected).
 void enableObjectName(ObjectName theObjName)
          Enables MBeanServerNotifications concerning given ObjectName.
 Vector getDisabledObjectNames()
          Gets all the ObjectNames disabled.
 Vector getEnabledObjectNames()
          Gets all the ObjectNames enabled.
 boolean isNotificationEnabled(Notification theNtf)
          Invoked before sending the specified notification to the listener.
 
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, toString, wait, wait, wait
 

Constructor Detail

MBeanServerNotificationFilter

public MBeanServerNotificationFilter()
Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.

Method Detail

disableAllObjectNames

public void disableAllObjectNames()
Disables any MBeanServerNotification (all ObjectNames are deselected).


disableObjectName

public void disableObjectName(ObjectName theObjName)
                       throws IllegalArgumentException
Disables MBeanServerNotifications concerning given ObjectName.

Parameters:
theObjName - ObjectName no longer of interest
Throws:
IllegalArgumentException - if the given ObjectName is null

enableAllObjectNames

public void enableAllObjectNames()
Enables all MBeanServerNotifications (all ObjectNames are selected).


enableObjectName

public void enableObjectName(ObjectName theObjName)
                      throws IllegalArgumentException
Enables MBeanServerNotifications concerning given ObjectName.

Parameters:
theObjName - ObjectName of interest
Throws:
IllegalArgumentException - if the given ObjectName is null

getEnabledObjectNames

public Vector getEnabledObjectNames()
Gets all the ObjectNames enabled.

Returns:
Vector of ObjectNames:

- null means all ObjectNames are implicitly selected, except the ObjectNames explicitly deselected

- empty means all ObjectNames are deselected, i.e. no ObjectName selected.


getDisabledObjectNames

public Vector getDisabledObjectNames()
Gets all the ObjectNames disabled.

Returns:
Vector of ObjectNames:

- null means all ObjectNames are implicitly deselected, except the ObjectNames explicitly selected

- empty means all ObjectNames are selected, i.e. no ObjectName deselected.


isNotificationEnabled

public boolean isNotificationEnabled(Notification theNtf)
                              throws IllegalArgumentException
Invoked before sending the specified notification to the listener.

If:

- the ObjectName of the concerned MBean is selected (explicitly OR (implicitly and not explicitly deselected))

AND

- the type of the operation (registration or unregistration) is selected

then the notification is sent to the listener.

Specified by:
isNotificationEnabled in interface NotificationFilter
Overrides:
isNotificationEnabled in class NotificationFilterSupport
Parameters:
theNtf - The notification to be sent.
Returns:
true if the notification has to be sent to the listener, false otherwise.
Throws:
IllegalArgumentException - if null parameter

Copyright 2003 Sun Microsystems, Inc. All rights reserved