public class MBeanServerNotificationFilter extends NotificationFilterSupport
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.
| Constructor and Description |
|---|
MBeanServerNotificationFilter()
Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableAllObjectNames()
Disables any MBeanServerNotification (all ObjectNames are deselected).
|
void |
disableObjectName(ObjectName
Disables MBeanServerNotifications concerning given ObjectName.
|
void |
enableAllObjectNames()
Enables all MBeanServerNotifications (all ObjectNames are selected).
|
void |
enableObjectName(ObjectName
Enables MBeanServerNotifications concerning given ObjectName.
|
Vector |
getDisabledObjectNames()
Gets all the ObjectNames disabled.
|
Vector |
getEnabledObjectNames()
Gets all the ObjectNames enabled.
|
boolean |
isNotificationEnabled(Notification
Invoked before sending the specified notification to the listener.
|
disableAllTypes, disableType, enableType, getEnabledTypespublic MBeanServerNotificationFilter()
public void disableAllObjectNames()
public void disableObjectName(ObjectNameobjectName) throws IllegalArgumentException
objectName - ObjectName no longer of interest
IllegalArgumentException - if the given ObjectName is null
public void enableAllObjectNames()
public void enableObjectName(ObjectNameobjectName) throws IllegalArgumentException
objectName - ObjectName of interest
IllegalArgumentException - if the given ObjectName is null
public Vector<ObjectName > getEnabledObjectNames()
- 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()
- 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(Notificationnotif) throws IllegalArgumentException
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