Class JsonMonitorableWrapper

  • All Implemented Interfaces:
    JsonMonitorable

    public class JsonMonitorableWrapper
    extends Object
    implements JsonMonitorable
    A simple JsonMonitorable implementation that wraps a set of child monitorables and adds own metrics.
    Author:
    Eyal Schneider
    • Constructor Detail

      • JsonMonitorableWrapper

        public JsonMonitorableWrapper​(net.minidev.json.JSONObject ownMetrics,
                                      Map<String,​? extends JsonMonitorable> children)
      • JsonMonitorableWrapper

        public JsonMonitorableWrapper​(net.minidev.json.JSONObject ownMetrics)
    • Method Detail

      • getOwnMetrics

        public net.minidev.json.JSONObject getOwnMetrics()
        Specified by:
        getOwnMetrics in interface JsonMonitorable
        Returns:
        The json string describing the entity, not including the child entities.
      • getChildren

        public Map<String,​? extends JsonMonitorable> getChildren()
        Specified by:
        getChildren in interface JsonMonitorable
        Returns:
        The monitorable children of this entity, as [id, JsonExportable] pairs. Using this method, the framework can manage a complete tree to be monitored, where every entity has a unique path.