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).
The serialVersionUID of this class is 2605900539589789736L
.
public MBeanServerNotificationFilter()
Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.
public void disableAllObjectNames()
Disables any MBeanServerNotification (all ObjectNames are deselected).
public void disableObjectName(ObjectName objectName) throws IllegalArgumentException
Disables MBeanServerNotifications concerning given ObjectName.
objectName
- ObjectName no longer of interestIllegalArgumentException
- if the given ObjectName is nullpublic void enableAllObjectNames()
Enables all MBeanServerNotifications (all ObjectNames are selected).
public void enableObjectName(ObjectName objectName) throws IllegalArgumentException
Enables MBeanServerNotifications concerning given ObjectName.
objectName
- ObjectName of interestIllegalArgumentException
- if the given ObjectName is nullpublic Vector<ObjectName> getEnabledObjectNames()
Gets all the ObjectNames enabled.
- null means all ObjectNames are implicitly selected, except the ObjectNames explicitly deselected
- empty means all ObjectNames are deselected, i.e. no ObjectName selected.
public Vector<ObjectName> getDisabledObjectNames()
Gets all the ObjectNames disabled.
- null means all ObjectNames are implicitly deselected, except the ObjectNames explicitly selected
- empty means all ObjectNames are selected, i.e. no ObjectName deselected.
public boolean isNotificationEnabled(Notification notif) 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.
isNotificationEnabled
in interface NotificationFilter
isNotificationEnabled
in class NotificationFilterSupport
notif
- The notification to be sent.IllegalArgumentException
- if null parameter
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.