public class MBeanServerDelegate extends Object implements MBeanServerDelegateMBean, NotificationEmitter
Represents the MBean server from the management point of view. The MBeanServerDelegate MBean emits the MBeanServerNotifications when an MBean is registered/unregistered in the MBean server.
public static final ObjectName DELEGATE_NAME
Defines the default ObjectName of the MBeanServerDelegate.
public MBeanServerDelegate()
Create a MBeanServerDelegate object.
public String getMBeanServerId()
Returns the MBean server agent identity.
getMBeanServerId
in interface MBeanServerDelegateMBean
public String getSpecificationName()
Returns the full name of the JMX specification implemented by this product.
getSpecificationName
in interface MBeanServerDelegateMBean
public String getSpecificationVersion()
Returns the version of the JMX specification implemented by this product.
getSpecificationVersion
in interface MBeanServerDelegateMBean
public String getSpecificationVendor()
Returns the vendor of the JMX specification implemented by this product.
getSpecificationVendor
in interface MBeanServerDelegateMBean
public String getImplementationName()
Returns the JMX implementation name (the name of this product).
getImplementationName
in interface MBeanServerDelegateMBean
public String getImplementationVersion()
Returns the JMX implementation version (the version of this product).
getImplementationVersion
in interface MBeanServerDelegateMBean
public String getImplementationVendor()
Returns the JMX implementation vendor (the vendor of this product).
getImplementationVendor
in interface MBeanServerDelegateMBean
public MBeanNotificationInfo[] getNotificationInfo()
Description copied from interface: NotificationBroadcaster
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.
getNotificationInfo
in interface NotificationBroadcaster
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
Description copied from interface: NotificationBroadcaster
Adds a listener to this MBean.
addNotificationListener
in interface NotificationBroadcaster
listener
- The listener object which will handle the notifications emitted by the broadcaster.filter
- The filter object. If filter is null, no filtering will be performed before handling notifications.handback
- An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.IllegalArgumentException
- Listener parameter is null.NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
Description copied from interface: NotificationEmitter
Removes a listener from this MBean. The MBean must have a listener that exactly matches the given listener
, filter
, and handback
parameters. If there is more than one such listener, only one is removed.
The filter
and handback
parameters may be null if and only if they are null in a listener to be removed.
removeNotificationListener
in interface NotificationEmitter
listener
- A listener that was previously added to this MBean.filter
- The filter that was specified when the listener was added.handback
- The handback that was specified when the listener was added.ListenerNotFoundException
- The listener is not registered with the MBean, or it is not registered with the given filter and handback.public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
Description copied from interface: NotificationBroadcaster
Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.
removeNotificationListener
in interface NotificationBroadcaster
listener
- A listener that was previously added to this MBean.ListenerNotFoundException
- The listener is not registered with the MBean.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
, NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
public void sendNotification(Notification notification)
Enables the MBean server to send a notification. If the passed notification has a sequence number lesser or equal to 0, then replace it with the delegate's own sequence number.
notification
- The notification to send.
© 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.