- java.lang.Object
-
- javax.management.NotificationFilterSupport
-
- javax.management.relation.MBeanServerNotificationFilter
-
- All Implemented Interfaces:
- Serializable, NotificationFilter
public class MBeanServerNotificationFilter extends NotificationFilterSupport
Filter forMBeanServerNotification
. 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
.- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description MBeanServerNotificationFilter()
Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.
-
Method Summary
Methods Modifier and Type Method and Description void
disableAllObjectNames()
Disables any MBeanServerNotification (all ObjectNames are deselected).void
disableObjectName(ObjectName objectName)
Disables MBeanServerNotifications concerning given ObjectName.void
enableAllObjectNames()
Enables all MBeanServerNotifications (all ObjectNames are selected).void
enableObjectName(ObjectName objectName)
Enables MBeanServerNotifications concerning given ObjectName.Vector<ObjectName>
getDisabledObjectNames()
Gets all the ObjectNames disabled.Vector<ObjectName>
getEnabledObjectNames()
Gets all the ObjectNames enabled.boolean
isNotificationEnabled(Notification notif)
Invoked before sending the specified notification to the listener.-
Methods inherited from class javax.management.NotificationFilterSupport
disableAllTypes, disableType, enableType, getEnabledTypes
-
-
-
-
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 objectName) throws IllegalArgumentException
Disables MBeanServerNotifications concerning given ObjectName.- Parameters:
objectName
- 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 objectName) throws IllegalArgumentException
Enables MBeanServerNotifications concerning given ObjectName.- Parameters:
objectName
- ObjectName of interest- Throws:
IllegalArgumentException
- if the given ObjectName is null
-
getEnabledObjectNames
public Vector<ObjectName> 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<ObjectName> 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 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.
- Specified by:
isNotificationEnabled
in interfaceNotificationFilter
- Overrides:
isNotificationEnabled
in classNotificationFilterSupport
- Parameters:
notif
- The notification to be sent.- Returns:
- true if the notification has to be sent to the listener, false otherwise.
- Throws:
IllegalArgumentException
- if null parameter
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/management/relation/MBeanServerNotificationFilter.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.