MBeanServerDelegate (Java SE 16 & JDK 16) (original) (raw)
All Implemented Interfaces:
[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
, [NotificationBroadcaster](NotificationBroadcaster.html "interface in javax.management")
, [NotificationEmitter](NotificationEmitter.html "interface in javax.management")
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.
Since:
1.5
Field Summary
Fields
Defines the default ObjectName of the MBeanServerDelegate.
Constructor Summary
Constructors
Create a MBeanServerDelegate object.
Method Summary
void
Adds a listener to this MBean.
Returns the JMX implementation name (the name of this product).
Returns the JMX implementation vendor (the vendor of this product).
Returns the JMX implementation version (the version of this product).
Returns the MBean server agent identity.
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
Returns the full name of the JMX specification implemented by this product.
Returns the vendor of the JMX specification implemented by this product.
Returns the version of the JMX specification implemented by this product.void
Removes a listener from this MBean.void
Removes a listener from this MBean.void
Enables the MBean server to send a notification.
Methods declared in class java.lang.Object
[clone](../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../java.base/java/lang/Object.html#wait%28long,int%29)
Field Details
DELEGATE_NAME
public static final ObjectName DELEGATE_NAME
Defines the default ObjectName of the MBeanServerDelegate.
Since:
1.6Constructor Details
MBeanServerDelegate
public MBeanServerDelegate()
Create a MBeanServerDelegate object.Method Details
getMBeanServerId
public String getMBeanServerId()
Returns the MBean server agent identity.
Specified by:
[getMBeanServerId](MBeanServerDelegateMBean.html#getMBeanServerId%28%29)
in interface[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
Returns:
the identity.getSpecificationName
public String getSpecificationName()
Returns the full name of the JMX specification implemented by this product.
Specified by:
[getSpecificationName](MBeanServerDelegateMBean.html#getSpecificationName%28%29)
in interface[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
Returns:
the specification name.getSpecificationVersion
public String getSpecificationVersion()
Returns the version of the JMX specification implemented by this product.
Specified by:
[getSpecificationVersion](MBeanServerDelegateMBean.html#getSpecificationVersion%28%29)
in interface[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
Returns:
the specification version.getSpecificationVendor
public String getSpecificationVendor()
Returns the vendor of the JMX specification implemented by this product.
Specified by:
[getSpecificationVendor](MBeanServerDelegateMBean.html#getSpecificationVendor%28%29)
in interface[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
Returns:
the specification vendor.getImplementationName
public String getImplementationName()
Returns the JMX implementation name (the name of this product).
Specified by:
[getImplementationName](MBeanServerDelegateMBean.html#getImplementationName%28%29)
in interface[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
Returns:
the implementation name.getImplementationVersion
public String getImplementationVersion()
Returns the JMX implementation version (the version of this product).
Specified by:
[getImplementationVersion](MBeanServerDelegateMBean.html#getImplementationVersion%28%29)
in interface[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
Returns:
the implementation version.getImplementationVendor
public String getImplementationVendor()
Returns the JMX implementation vendor (the vendor of this product).
Specified by:
[getImplementationVendor](MBeanServerDelegateMBean.html#getImplementationVendor%28%29)
in interface[MBeanServerDelegateMBean](MBeanServerDelegateMBean.html "interface in javax.management")
Returns:
the implementation vendor.getNotificationInfo
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.
Specified by:
[getNotificationInfo](NotificationBroadcaster.html#getNotificationInfo%28%29)
in interface[NotificationBroadcaster](NotificationBroadcaster.html "interface in javax.management")
Returns:
the array of possible notifications.addNotificationListener
Adds a listener to this MBean.
Specified by:
[addNotificationListener](NotificationBroadcaster.html#addNotificationListener%28javax.management.NotificationListener,javax.management.NotificationFilter,java.lang.Object%29)
in interface[NotificationBroadcaster](NotificationBroadcaster.html "interface in javax.management")
Parameters:
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.
Throws:
[IllegalArgumentException](../../../java.base/java/lang/IllegalArgumentException.html "class in java.lang")
- Listener parameter is null.
See Also:
NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)removeNotificationListener
Removes a listener from this MBean. The MBean must have a listener that exactly matches the given
listener
,filter
, andhandback
parameters. If there is more than one such listener, only one is removed.
Thefilter
andhandback
parameters may be null if and only if they are null in a listener to be removed.
Specified by:
[removeNotificationListener](NotificationEmitter.html#removeNotificationListener%28javax.management.NotificationListener,javax.management.NotificationFilter,java.lang.Object%29)
in interface[NotificationEmitter](NotificationEmitter.html "interface in javax.management")
Parameters:
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.
Throws:
[ListenerNotFoundException](ListenerNotFoundException.html "class in javax.management")
- The listener is not registered with the MBean, or it is not registered with the given filter and handback.removeNotificationListener
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.
Specified by:
[removeNotificationListener](NotificationBroadcaster.html#removeNotificationListener%28javax.management.NotificationListener%29)
in interface[NotificationBroadcaster](NotificationBroadcaster.html "interface in javax.management")
Parameters:
listener
- A listener that was previously added to this MBean.
Throws:
[ListenerNotFoundException](ListenerNotFoundException.html "class in javax.management")
- The listener is not registered with the MBean.
See Also:
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object), NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)sendNotification
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.
Parameters:
notification
- The notification to send.