javax.management.relation
Class MBeanServerNotificationFilter
java.lang.Object
|
+--javax.management.NotificationFilterSupport
|
+--javax.management.relation.MBeanServerNotificationFilter
- All Implemented Interfaces:
- NotificationFilter, java.io.Serializable
- public class MBeanServerNotificationFilter
- extends NotificationFilterSupport
This filter allows to filter MBeanServerNotification notifications by
selecting the ObjectNames of interest and the operations (registration,
unregistration, both) of interest (corresponding to notification types).
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MBeanServerNotificationFilter
public MBeanServerNotificationFilter()
- Creates a filter selecting all MBeanServerNotification notifications for
all ObjectNames
disableAllObjectNames
public void disableAllObjectNames()
- Disables any MBeanServerNotification (i.e. all ObjectNames deselected)
disableObjectName
public void disableObjectName(ObjectName theObjName)
throws java.lang.IllegalArgumentException
- Disables MBeanServerNotifications concerning given ObjectName.
- Parameters:
theObjName
- - ObjectName no longer of interest- Throws:
java.lang.IllegalArgumentException
- - if the given ObjectName is null
enableAllObjectNames
public void enableAllObjectNames()
- Enables all MBeanServerNotifications (i.e. all ObjectNames selected)
enableObjectName
public void enableObjectName(ObjectName theObjName)
throws java.lang.IllegalArgumentException
- Enables MBeanServerNotifications concerning given ObjectName.
- Parameters:
theObjName
- - ObjectName of interest- Throws:
java.lang.IllegalArgumentException
- - if the given ObjectName is null
getDisabledObjectNames
public 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.
getEnabledObjectNames
public 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.
isNotificationEnabled
public boolean isNotificationEnabled(Notification theNtf)
throws 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.
Overrides:
isNotificationEnabled in class NotificationFilterSupport
- 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:
java.lang.IllegalArgumentException
- - if null parameter
Copyright ©2003 XMOJO.org. All Rights Reserved.