javax.management.relation
Class MBeanServerNotificationFilter

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.NotificationFilterSupport sample code for javax.management.NotificationFilterSupport definition code for javax.management.NotificationFilterSupport 
      extended by javax.management.relation.MBeanServerNotificationFilter
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter

public class MBeanServerNotificationFilter
extends NotificationFilterSupport sample code for javax.management.NotificationFilterSupport definition code for javax.management.NotificationFilterSupport

Filter for MBeanServerNotification sample code for javax.management.MBeanServerNotification definition code for javax.management.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 sample code for javax.management.relation.MBeanServerNotificationFilter.MBeanServerNotificationFilter() definition code for javax.management.relation.MBeanServerNotificationFilter.MBeanServerNotificationFilter() ()
          Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.
 
Method Summary
 void disableAllObjectNames sample code for javax.management.relation.MBeanServerNotificationFilter.disableAllObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.disableAllObjectNames() ()
          Disables any MBeanServerNotification (all ObjectNames are deselected).
 void disableObjectName sample code for javax.management.relation.MBeanServerNotificationFilter.disableObjectName(javax.management.ObjectName) definition code for javax.management.relation.MBeanServerNotificationFilter.disableObjectName(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theObjName)
          Disables MBeanServerNotifications concerning given ObjectName.
 void enableAllObjectNames sample code for javax.management.relation.MBeanServerNotificationFilter.enableAllObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.enableAllObjectNames() ()
          Enables all MBeanServerNotifications (all ObjectNames are selected).
 void enableObjectName sample code for javax.management.relation.MBeanServerNotificationFilter.enableObjectName(javax.management.ObjectName) definition code for javax.management.relation.MBeanServerNotificationFilter.enableObjectName(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theObjName)
          Enables MBeanServerNotifications concerning given ObjectName.
 Vector sample code for java.util.Vector definition code for java.util.Vector getDisabledObjectNames sample code for javax.management.relation.MBeanServerNotificationFilter.getDisabledObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.getDisabledObjectNames() ()
          Gets all the ObjectNames disabled.
 Vector sample code for java.util.Vector definition code for java.util.Vector getEnabledObjectNames sample code for javax.management.relation.MBeanServerNotificationFilter.getEnabledObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.getEnabledObjectNames() ()
          Gets all the ObjectNames enabled.
 boolean isNotificationEnabled sample code for javax.management.relation.MBeanServerNotificationFilter.isNotificationEnabled(javax.management.Notification) definition code for javax.management.relation.MBeanServerNotificationFilter.isNotificationEnabled(javax.management.Notification) (Notification sample code for javax.management.Notification definition code for javax.management.Notification  theNtf)
          Invoked before sending the specified notification to the listener.
 
Methods inherited from class javax.management.NotificationFilterSupport sample code for javax.management.NotificationFilterSupport definition code for javax.management.NotificationFilterSupport
disableAllTypes sample code for javax.management.NotificationFilterSupport.disableAllTypes() definition code for javax.management.NotificationFilterSupport.disableAllTypes() , disableType sample code for javax.management.NotificationFilterSupport.disableType(java.lang.String) definition code for javax.management.NotificationFilterSupport.disableType(java.lang.String) , enableType sample code for javax.management.NotificationFilterSupport.enableType(java.lang.String) definition code for javax.management.NotificationFilterSupport.enableType(java.lang.String) , getEnabledTypes sample code for javax.management.NotificationFilterSupport.getEnabledTypes() definition code for javax.management.NotificationFilterSupport.getEnabledTypes()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

MBeanServerNotificationFilter sample code for javax.management.relation.MBeanServerNotificationFilter() definition code for javax.management.relation.MBeanServerNotificationFilter()

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

Method Detail

disableAllObjectNames sample code for javax.management.relation.MBeanServerNotificationFilter.disableAllObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.disableAllObjectNames()

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


disableObjectName sample code for javax.management.relation.MBeanServerNotificationFilter.disableObjectName(javax.management.ObjectName) definition code for javax.management.relation.MBeanServerNotificationFilter.disableObjectName(javax.management.ObjectName)

public void disableObjectName(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theObjName)
                       throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Disables MBeanServerNotifications concerning given ObjectName.

Parameters:
theObjName - ObjectName no longer of interest
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the given ObjectName is null

enableAllObjectNames sample code for javax.management.relation.MBeanServerNotificationFilter.enableAllObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.enableAllObjectNames()

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


enableObjectName sample code for javax.management.relation.MBeanServerNotificationFilter.enableObjectName(javax.management.ObjectName) definition code for javax.management.relation.MBeanServerNotificationFilter.enableObjectName(javax.management.ObjectName)

public void enableObjectName(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theObjName)
                      throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Enables MBeanServerNotifications concerning given ObjectName.

Parameters:
theObjName - ObjectName of interest
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the given ObjectName is null

getEnabledObjectNames sample code for javax.management.relation.MBeanServerNotificationFilter.getEnabledObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.getEnabledObjectNames()

public Vector sample code for java.util.Vector definition code for java.util.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 sample code for javax.management.relation.MBeanServerNotificationFilter.getDisabledObjectNames() definition code for javax.management.relation.MBeanServerNotificationFilter.getDisabledObjectNames()

public Vector sample code for java.util.Vector definition code for java.util.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 sample code for javax.management.relation.MBeanServerNotificationFilter.isNotificationEnabled(javax.management.Notification) definition code for javax.management.relation.MBeanServerNotificationFilter.isNotificationEnabled(javax.management.Notification)

public boolean isNotificationEnabled(Notification sample code for javax.management.Notification definition code for javax.management.Notification  theNtf)
                              throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.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 sample code for javax.management.NotificationFilter.isNotificationEnabled(javax.management.Notification) definition code for javax.management.NotificationFilter.isNotificationEnabled(javax.management.Notification) in interface NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter
Overrides:
isNotificationEnabled sample code for javax.management.NotificationFilterSupport.isNotificationEnabled(javax.management.Notification) definition code for javax.management.NotificationFilterSupport.isNotificationEnabled(javax.management.Notification) in class NotificationFilterSupport sample code for javax.management.NotificationFilterSupport definition code for javax.management.NotificationFilterSupport
Parameters:
theNtf - The notification to be sent.
Returns:
true if the notification has to be sent to the listener, false otherwise.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter