Example usage for javax.management MBeanNotificationInfo getDescription

List of usage examples for javax.management MBeanNotificationInfo getDescription

Introduction

In this page you can find the example usage for javax.management MBeanNotificationInfo getDescription.

Prototype

public String getDescription() 

Source Link

Document

Returns the human-readable description of the feature.

Usage

From source file:org.jolokia.handler.list.NotificationDataUpdater.java

/** {@inheritDoc} */
@Override//from w w  w .  j  ava  2s  . co m
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);/*from www  . jav  a  2s  .  co  m*/
        out.put("description", att.getDescription());
        out.put("type", att.getNotifTypes());
    }
    return outc;
}