📄 mbeannotificationdescriptor.java
字号:
/*
======================================================================
XMLMBeanNotificationInfo.java
Created by Claude Duguay
Copyright (c) 2005
======================================================================
*/
package com.claudeduguay.mbeans.model;
import org.jdom.*;
import javax.management.modelmbean.*;
import com.claudeduguay.util.jdom.*;
public class MBeanNotificationDescriptor
extends MBeanFeatureDescriptor
implements IStorableElement
{
protected String[] types;
public MBeanNotificationDescriptor() {}
public MBeanNotificationDescriptor(Element element)
{
parseElement(element);
}
public ModelMBeanNotificationInfo createMBeanNotificationInfo()
{
return new ModelMBeanNotificationInfo(types, name, description);
}
public String[] getNotifyTypes()
{
return types;
}
public void setNotifyTypes(String[] types)
{
this.types = types;
}
public Element buildElement()
{
Element element = super.buildElement();
element.setName("notification");
element.setAttribute("types", MBeanDescriptorUtil.buildCommaSeparatedList(getNotifyTypes()));
return element;
}
public void parseElement(Element element)
{
super.parseElement(element);
setNotifyTypes(MBeanDescriptorUtil.parseCommaSeparatedList(element.getAttributeValue("types")));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -