JavaTM 2 Platform
Standard Ed. 6

javax.management
类 MBeanServerNotification

java.lang.Object
  继承者 java.util.EventObject
      继承者 javax.management.Notification
          继承者 javax.management.MBeanServerNotification
所有已实现的接口:
Serializable

public class MBeanServerNotification
extends Notification

表示 MBean 服务器通过 MBeanServerDelegate MBean 所发出的通知。MBean 服务器发出下列类型的通知:MBean 注册、MBean 注销。

要想接收 MBeanServerNotifications,需要声明为表示 MBeanServer 的 javax.management.MBeanServerDelegate MBean 的侦听器。MBeanServerDelegate 的 ObjectName 是:JMImplementation:type=MBeanServerDelegate

从以下版本开始:
1.5
另请参见:
序列化表格

字段摘要
static String REGISTRATION_NOTIFICATION
          表示已注册该 MBean 的通知类型。
static String UNREGISTRATION_NOTIFICATION
          表示已注销该 MBean 的通知类型。
 
从类 javax.management.Notification 继承的字段
source
 
构造方法摘要
MBeanServerNotification(String type, Object source, long sequenceNumber, ObjectName objectName)
          创建一个指定了导致该通知的 MBean 对象名和指定通知类型的 MBeanServerNotification 对象。
 
方法摘要
 ObjectName getMBeanName()
          返回导致该通知的 MBean 的对象名。
 
从类 javax.management.Notification 继承的方法
getMessage, getSequenceNumber, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toString
 
从类 java.util.EventObject 继承的方法
getSource
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

REGISTRATION_NOTIFICATION

public static final String REGISTRATION_NOTIFICATION
表示已注册该 MBean 的通知类型。其值是 "JMX.mbean.registered"。

另请参见:
常量字段值

UNREGISTRATION_NOTIFICATION

public static final String UNREGISTRATION_NOTIFICATION
表示已注销该 MBean 的通知类型。其值是 "JMX.mbean.unregistered"。

另请参见:
常量字段值
构造方法详细信息

MBeanServerNotification

public MBeanServerNotification(String type,
                               Object source,
                               long sequenceNumber,
                               ObjectName objectName)
创建一个指定了导致该通知的 MBean 对象名和指定通知类型的 MBeanServerNotification 对象。

参数:
type - 表示通知类型的字符串。设置为下列某个值:REGISTRATION_NOTIFICATION, UNREGISTRATION_NOTIFICATION
source - 负责转发 MBean 服务器通知的 MBeanServerNotification 对象。
sequenceNumber - 用于排序已接收通知的序列号。
objectName - 导致该通知的 MBean 的对象名。
方法详细信息

getMBeanName

public ObjectName getMBeanName()
返回导致该通知的 MBean 的对象名。

返回:
导致该通知的 MBean 的对象名。

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only