Class MBeanServerDelegate
- All Implemented Interfaces:
-
MBeanServerDelegateMBean,NotificationBroadcaster,NotificationEmitter
public class MBeanServerDelegate extends Object implements MBeanServerDelegateMBean, NotificationEmitter
- Since:
- 1.5
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
static final ObjectName |
DELEGATE_NAME |
Defines the default ObjectName of the MBeanServerDelegate. |
Constructor Summary
| Constructor | Description |
|---|---|
MBeanServerDelegate() |
Create a MBeanServerDelegate object. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
void |
addNotificationListener |
Adds a listener to this MBean. |
String |
getImplementationName() |
Returns the JMX implementation name (the name of this product). |
String |
getImplementationVendor() |
Returns the JMX implementation vendor (the vendor of this product). |
String |
getImplementationVersion() |
Returns the JMX implementation version (the version of this product). |
String |
getMBeanServerId() |
Returns the MBean server agent identity. |
MBeanNotificationInfo[] |
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. |
String |
getSpecificationName() |
Returns the full name of the JMX specification implemented by this product. |
String |
getSpecificationVendor() |
Returns the vendor of the JMX specification implemented by this product. |
String |
getSpecificationVersion() |
Returns the version of the JMX specification implemented by this product. |
void |
removeNotificationListener |
Removes a listener from this MBean. |
void |
removeNotificationListener |
Removes a listener from this MBean. |
void |
sendNotification |
Enables the MBean server to send a notification. |
Field Details
DELEGATE_NAME
public static final ObjectName DELEGATE_NAME
- Since:
- 1.6
Constructor Details
MBeanServerDelegate
public MBeanServerDelegate()
Method Details
getMBeanServerId
public String getMBeanServerId()
- Specified by:
-
getMBeanServerIdin interfaceMBeanServerDelegateMBean - Returns:
- the identity.
getSpecificationName
public String getSpecificationName()
- Specified by:
-
getSpecificationNamein interfaceMBeanServerDelegateMBean - Returns:
- the specification name.
getSpecificationVersion
public String getSpecificationVersion()
- Specified by:
-
getSpecificationVersionin interfaceMBeanServerDelegateMBean - Returns:
- the specification version.
getSpecificationVendor
public String getSpecificationVendor()
- Specified by:
-
getSpecificationVendorin interfaceMBeanServerDelegateMBean - Returns:
- the specification vendor.
getImplementationName
public String getImplementationName()
- Specified by:
-
getImplementationNamein interfaceMBeanServerDelegateMBean - Returns:
- the implementation name.
getImplementationVersion
public String getImplementationVersion()
- Specified by:
-
getImplementationVersionin interfaceMBeanServerDelegateMBean - Returns:
- the implementation version.
getImplementationVendor
public String getImplementationVendor()
- Specified by:
-
getImplementationVendorin interfaceMBeanServerDelegateMBean - Returns:
- the implementation vendor.
getNotificationInfo
public MBeanNotificationInfo[] getNotificationInfo()
NotificationBroadcasterReturns 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:
-
getNotificationInfoin interfaceNotificationBroadcaster - Returns:
- the array of possible notifications.
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
NotificationBroadcaster- Specified by:
-
addNotificationListenerin interfaceNotificationBroadcaster - 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- Listener parameter is null. - See Also:
removeNotificationListener
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
NotificationEmitterRemoves 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.
- Specified by:
-
removeNotificationListenerin interfaceNotificationEmitter - 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- The listener is not registered with the MBean, or it is not registered with the given filter and handback.
removeNotificationListener
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
NotificationBroadcaster- Specified by:
-
removeNotificationListenerin interfaceNotificationBroadcaster - Parameters:
-
listener- A listener that was previously added to this MBean. - Throws:
-
ListenerNotFoundException- The listener is not registered with the MBean. - See Also:
sendNotification
public void sendNotification(Notification notification)
- Parameters:
-
notification- The notification to send.
© 1993, 2021, 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.
https://docs.oracle.com/en/java/javase/17/docs/api/java.management/javax/management/MBeanServerDelegate.html