List of usage examples for javax.management MBeanNotificationInfo getNotifTypes
public String[] getNotifTypes()
From source file:org.jolokia.handler.list.NotificationDataUpdater.java
/** {@inheritDoc} */ @Override/* w w w . ja v a 2 s . c om*/ protected JSONObject extractData(MBeanInfo pMBeanInfo, String pNotification) { JSONObject notMap = new JSONObject(); for (MBeanNotificationInfo notInfo : pMBeanInfo.getNotifications()) { if (pNotification == null || notInfo.getName().equals(pNotification)) { JSONObject map = new JSONObject(); map.put(NAME.getKey(), notInfo.getName()); map.put(DESCRIPTION.getKey(), notInfo.getDescription()); String[] types = notInfo.getNotifTypes(); JSONArray tList = new JSONArray(); for (String type : types) { tList.add(type); } map.put(TYPES.getKey(), tList); } } return notMap; }
From source file:flens.query.JMXQuery.java
private Map<String, Object> getNotifications(MBeanInfo info) { Map<String, Object> outc = new HashMap<>(); MBeanNotificationInfo[] atts = info.getNotifications(); for (MBeanNotificationInfo att : atts) { Map<String, Object> out = new HashMap<>(); outc.put(att.getName(), out);// www . j a v a 2s.c om out.put("description", att.getDescription()); out.put("type", att.getNotifTypes()); } return outc; }