/* */ public static final String ENABLE_OBJECTNAME_ATTRIBUTE = "object-name";
/* */
/* */ public NotificationFilter createNotificationFilter(Element filterConfig)
/* */ throws Exception
/* */ {
/* 88 */ MBeanServerNotificationFilter filter = new MBeanServerNotificationFilter();
/* */
/* 92 */ NodeList filterChildren = filterConfig.getChildNodes();
/* */
/* 94 */ for (int i = 0; i < filterChildren.getLength(); i++)
/* */ {
/* 96 */ Node filterChildNode = filterChildren.item(i);
/* */
/* 99 */ if (!filterChildNode.getNodeName().equals("enable")) {
/* */ continue;
/* */ }
/* 102 */ if (((Element)filterChildNode).hasAttribute("type"))
/* */ {
/* 104 */ String type = ((Element)filterChildNode).getAttribute("type");
/* */
/* 106 */ filter.enableType(type);
/* */ }
/* 108 */ else if (((Element)filterChildNode).hasAttribute("object-name"))
/* */ {
/* 110 */ String objectName = ((Element)filterChildNode).getAttribute("object-name");
/* */
/* 113 */ filter.enableObjectName(new ObjectName(objectName));
/* */ }
/* */ else
/* */ {
/* 117 */ throw new Exception("'enable' element must have a 'type' or a 'object-name' attribute");
/* */ }