java.lang.Object
javax.management.MBeanServerDelegate
public class MBeanServerDelegate extends Object implements MBeanServerDelegateMBean , NotificationEmitter
从管理的角度代表 MBean 服务。当 MBean 在 MBean 服务中注册/注销时,MBeanServerDelegate MBean 发出 MBeanServerNotifications。
- 自从:
- 1.5
-
字段摘要
字段 -
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述voidaddNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) 向此 MBean 添加一个监听。返回 JMX 实现名称(此产品的名称)。返回 JMX 实现供应商(此产品的供应商)。返回 JMX 实现版本(本产品的版本)。返回 MBean 服务代理标识。返回一个数组,指示对于此 MBean 可能发送的每个通知,通知的 Java 类的名称和通知类型。返回此产品实现的 JMX 规范的全名。返回此产品实现的 JMX 规范的供应商。返回此产品实现的 JMX 规范的版本。void从此 MBean 中移除监听。voidremoveNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) 从此 MBean 中移除监听。voidsendNotification(Notification notification) 使 MBean 服务能够发送通知。
-
字段详细信息
-
DELEGATE_NAME
定义 MBeanServerDelegate 的默认 ObjectName。- 自从:
- 1.6
-
-
构造方法详细信息
-
MBeanServerDelegate
public MBeanServerDelegate()创建一个 MBeanServerDelegate 对象。
-
-
方法详情
-
getMBeanServerId
返回 MBean 服务代理标识。- 指定者:
getMBeanServerId在接口MBeanServerDelegateMBean中- 返回:
- 身份。
-
getSpecificationName
返回此产品实现的 JMX 规范的全名。- 指定者:
getSpecificationName在接口MBeanServerDelegateMBean中- 返回:
- 规范名称。
-
getSpecificationVersion
返回此产品实现的 JMX 规范的版本。- 指定者:
getSpecificationVersion在接口MBeanServerDelegateMBean中- 返回:
- 规范版本。
-
getSpecificationVendor
返回此产品实现的 JMX 规范的供应商。- 指定者:
getSpecificationVendor在接口MBeanServerDelegateMBean中- 返回:
- 规范供应商。
-
getImplementationName
返回 JMX 实现名称(此产品的名称)。- 指定者:
getImplementationName在接口MBeanServerDelegateMBean中- 返回:
- 实现名称。
-
getImplementationVersion
返回 JMX 实现版本(本产品的版本)。- 指定者:
getImplementationVersion在接口MBeanServerDelegateMBean中- 返回:
- 实现版本。
-
getImplementationVendor
返回 JMX 实现供应商(此产品的供应商)。- 指定者:
getImplementationVendor在接口MBeanServerDelegateMBean中- 返回:
- 实现供应商。
-
getNotificationInfo
从接口NotificationBroadcaster复制的描述返回一个数组,指示对于此 MBean 可能发送的每个通知,通知的 Java 类的名称和通知类型。
MBean 发送此数组中未描述的通知并不是非法的。但是,MBean 服务的某些客户端可能依赖于完整的数组才能正常运行。
- 指定者:
getNotificationInfo在接口NotificationBroadcaster中- 返回:
- 可能通知的数组。
-
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException 从接口NotificationBroadcaster复制的描述向此 MBean 添加一个监听。- 指定者:
addNotificationListener在接口NotificationBroadcaster中- 参数:
listener- 将处理广播者发出的通知的监听器对象。filter- 过滤器对象。如果 filter 为 null,则在处理通知之前不会执行任何过滤。handback- 发出通知时要发送回监听器的不透明对象。通知广播对象不能使用该对象。它应该与通知收听者的通知一起重新发送。- 抛出:
IllegalArgumentException- 监听器参数为空。- 参见:
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException 从接口NotificationEmitter复制的描述从此 MBean 中移除监听器。 MBean 必须具有与给定的
listener、filter和handback参数完全匹配的监听器。如果有多个这样的监听器,则只删除一个。当且仅当它们在要删除的监听器中为空时,
filter和handback参数可以为空。- 指定者:
removeNotificationListener在接口NotificationEmitter中- 参数:
listener- 先前添加到此 MBean 的监听器。filter- 添加监听器时指定的过滤器。handback- 添加监听器时指定的交接。- 抛出:
ListenerNotFoundException- 监听器未在 MBean 中注册,或者未在给定的过滤器和 handback 中注册。
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException 从接口NotificationBroadcaster复制的描述从此 MBean 中移除监听。如果监听已注册到不同的交接对象或通知过滤器,则该监听对应的所有条目将被删除。- 指定者:
removeNotificationListener在接口NotificationBroadcaster中- 参数:
listener- 先前添加到此 MBean 的监听器。- 抛出:
ListenerNotFoundException- 监听器未在 MBean 中注册。- 参见:
-
sendNotification
使 MBean 服务能够发送通知。如果通过了通知具有小于或等于 0 的序列号,然后将其替换为委托人自己的序列号。- 参数:
notification- 要发送的通知。
-