Top Description Fields Constructors Methods
javax.management.relation

public Class MBeanServerNotificationFilter

extends NotificationFilterSupport
Class Inheritance
Annotations
@SuppressWarnings:serial
Static Imports
com.sun.jmx.mbeanserver.Util.cast, com.sun.jmx.defaults.JmxProperties.RELATION_LOGGER

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

Field Summary

Modifier and TypeField and Description
private static boolean
private List<ObjectName>
private static final ObjectStreamField[]
private static final long
private static final ObjectStreamField[]
private static final long
private List<ObjectName>
private static final ObjectStreamField[]
private static final long

Constructor Summary

AccessConstructor and Description
public
MBeanServerNotificationFilter()

Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.

Method Summary

Modifier and TypeMethod and Description
public synchronized void
disableAllObjectNames()

Disables any MBeanServerNotification (all ObjectNames are deselected).

public synchronized void
disableObjectName(ObjectName
ObjectName no longer of interest
objectName
)

Disables MBeanServerNotifications concerning given ObjectName.

public synchronized void
enableAllObjectNames()

Enables all MBeanServerNotifications (all ObjectNames are selected).

public synchronized void
enableObjectName(ObjectName
ObjectName of interest
objectName
)

Enables MBeanServerNotifications concerning given ObjectName.

public synchronized Vector<ObjectName>

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.

getDisabledObjectNames
()

Gets all the ObjectNames disabled.

public synchronized Vector<ObjectName>

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.

getEnabledObjectNames
()

Gets all the ObjectNames enabled.

public synchronized boolean

Returns:

true if the notification has to be sent to the listener, false otherwise.
isNotificationEnabled
(Notification
The notification to be sent.
notif
)

Overrides javax.management.NotificationFilterSupport.isNotificationEnabled.

Implements javax.management.NotificationFilter.isNotificationEnabled.

Invoked before sending the specified notification to the listener.

private void
private void
Inherited from javax.management.NotificationFilterSupport:
disableAllTypesdisableTypeenableTypegetEnabledTypes

Field Detail

compatback to summary
private static boolean compat
deselectedNamesback to summary
private List<ObjectName> deselectedNames
newSerialPersistentFieldsback to summary
private static final ObjectStreamField[] newSerialPersistentFields
newSerialVersionUIDback to summary
private static final long newSerialVersionUID
oldSerialPersistentFieldsback to summary
private static final ObjectStreamField[] oldSerialPersistentFields
oldSerialVersionUIDback to summary
private static final long oldSerialVersionUID
selectedNamesback to summary
private List<ObjectName> selectedNames
serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
Serial Fields:
selectedNames:List
List of ObjectNames of interest
  • null means that all ObjectNames are implicitly selected (check for explicit deselections)
  • Empty vector means that no ObjectName is explicitly selected
deselectedNames:List
List of ObjectNames with no interest
  • null means that all ObjectNames are implicitly deselected (check for explicit selections))
  • Empty vector means that no ObjectName is explicitly deselected
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.management.NotificationFilterSupport.serialVersionUID.

Constructor Detail

MBeanServerNotificationFilterback to summary
public MBeanServerNotificationFilter()

Creates a filter selecting all MBeanServerNotification notifications for all ObjectNames.

Method Detail

disableAllObjectNamesback to summary
public synchronized void disableAllObjectNames()

Disables any MBeanServerNotification (all ObjectNames are deselected).

disableObjectNameback to summary
public synchronized void disableObjectName(ObjectName objectName) throws IllegalArgumentException

Disables MBeanServerNotifications concerning given ObjectName.

Parameters
objectName:ObjectName

ObjectName no longer of interest

Exceptions
IllegalArgumentException:
if the given ObjectName is null
enableAllObjectNamesback to summary
public synchronized void enableAllObjectNames()

Enables all MBeanServerNotifications (all ObjectNames are selected).

enableObjectNameback to summary
public synchronized void enableObjectName(ObjectName objectName) throws IllegalArgumentException

Enables MBeanServerNotifications concerning given ObjectName.

Parameters
objectName:ObjectName

ObjectName of interest

Exceptions
IllegalArgumentException:
if the given ObjectName is null
getDisabledObjectNamesback to summary
public synchronized Vector<ObjectName> getDisabledObjectNames()

Gets all the ObjectNames disabled.

Returns:Vector<ObjectName>

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.

getEnabledObjectNamesback to summary
public synchronized Vector<ObjectName> getEnabledObjectNames()

Gets all the ObjectNames enabled.

Returns:Vector<ObjectName>

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.

isNotificationEnabledback to summary
public synchronized boolean isNotificationEnabled(Notification notif) throws IllegalArgumentException

Overrides javax.management.NotificationFilterSupport.isNotificationEnabled.

Implements javax.management.NotificationFilter.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.

Parameters
notif:Notification

The notification to be sent.

Returns:boolean

true if the notification has to be sent to the listener, false otherwise.

Exceptions
IllegalArgumentException:
if null parameter
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Deserializes an MBeanServerNotificationFilter from an ObjectInputStream.

writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Serializes an MBeanServerNotificationFilter to an ObjectOutputStream.