Class MBeanServerNotificationFilter
java.lang.Object
javax.management.NotificationFilterSupport
javax.management.relation.MBeanServerNotificationFilter
- All Implemented Interfaces:
Serializable, NotificationFilter
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.
- Since:
- 1.5
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a filter selecting all MBeanServerNotification notifications for all ObjectNames. -
Method Summary
Modifier and TypeMethodDescriptionvoidDisables any MBeanServerNotification (all ObjectNames are deselected).voiddisableObjectName(ObjectName objectName) Disables MBeanServerNotifications concerning given ObjectName.voidEnables all MBeanServerNotifications (all ObjectNames are selected).voidenableObjectName(ObjectName objectName) Enables MBeanServerNotifications concerning given ObjectName.Gets all the ObjectNames disabled.Gets all the ObjectNames enabled.booleanInvoked before sending the specified notification to the listener.Methods declared in class NotificationFilterSupport
disableAllTypes, disableType, enableType, getEnabledTypesModifier and TypeMethodDescriptionvoidDisables all notification types.voiddisableType(String prefix) Removes the given prefix from the prefix list.voidenableType(String prefix) Enables all the notifications the type of which starts with the specified prefix to be sent to the listener.Gets all the enabled notification types for this filter.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
MBeanServerNotificationFilter
public MBeanServerNotificationFilter()Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.
-
-
Method Details
-
disableAllObjectNames
public void disableAllObjectNames()Disables any MBeanServerNotification (all ObjectNames are deselected). -
disableObjectName
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
Enables MBeanServerNotifications concerning given ObjectName.- Parameters:
objectName- ObjectName of interest- Throws:
IllegalArgumentException- if the given ObjectName is null
-
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
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
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:
isNotificationEnabledin interfaceNotificationFilter- Overrides:
isNotificationEnabledin 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
-