List of usage examples for javax.management.relation MBeanServerNotificationFilter disableObjectName
public synchronized void disableObjectName(ObjectName objectName) throws IllegalArgumentException
From source file:org.mule.providers.jmx.JmxEndpointBuilder.java
private void setNotificationMBeans(MBeanServerNotificationFilter filter, String[] onames) throws MalformedObjectNameException { if (onames.length == 0) return;//from ww w. j av a 2s . c om if (onames[0].equals("!*")) { filter.disableAllObjectNames(); } for (String oname : onames) { boolean shallEnable = !oname.startsWith("!"); if (shallEnable) { oname = oname.substring(1); } if ("*".equals(oname)) { if (shallEnable) { filter.enableAllObjectNames(); } else { filter.disableAllObjectNames(); } continue; } try { ObjectName objName = new ObjectName(oname); if (shallEnable) { filter.enableObjectName(objName); } else { filter.disableObjectName(objName); } } catch (Exception e) { logger.warn("Could not " + (shallEnable ? "enable" : "disable") + " " + oname, e); } } }