NotificationFilterSupportTest.java 文件源码

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

项目:freeVM 作者:
/**
 * Disable all types, change attribute1, invoke sayHello.
 */
public final void setUpDisableAllTypes()
    throws InstanceNotFoundException, AttributeNotFoundException,
    InvalidAttributeValueException, MBeanException, ReflectionException {
    NotificationFilterSupport f = new NotificationFilterSupport();
    f.enableType(AttributeChangeNotification.ATTRIBUTE_CHANGE);
    f.enableType(Hello.SAY_HELLO_INVOKED);
    f.disableAllTypes();
    mbs.addNotificationListener(name, this, f, null);
    freeze(300);
    mbs.setAttribute(name, new Attribute("Attribute1", "New value"));
    mbs.invoke(name, "sayHello", new Object[0], new String[0]);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号