NotificationFilterSupportTest.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:freeVM 作者:
/**
 * Disable ATTRIBUTE_CHANGE type, change attribute1.
 */
public final void setUpDisableType() throws InstanceNotFoundException,
    AttributeNotFoundException, InvalidAttributeValueException,
    MBeanException, ReflectionException {
    NotificationFilterSupport f = new NotificationFilterSupport();
    f.enableType(AttributeChangeNotification.ATTRIBUTE_CHANGE);
    f.disableType(AttributeChangeNotification.ATTRIBUTE_CHANGE);
    mbs.addNotificationListener(name, this, f, null);
    freeze(300);
    mbs.setAttribute(name, new Attribute("Attribute1", "New value"));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号