Class MonitorData

java.lang.Object
org.opends.server.api.MonitorData

public final class MonitorData extends Object
This class is used to hold monitoring data, i.e. a list of attributes. It provides convenient methods to easily build such data.

Note:
Creating monitor entries may become a lot easier once we've migrated to the SDK Entry class:

 Entry entry = ...;
 entry.addAttribute("stringStat", "aString")
      .addAttribute("integerStat", 12345)
      .addAttribute("dnStat", Dn.valueOf("dc=aDN");
 
We could also envisage an annotation based approach where we determine the monitor content from annotated fields/methods in an object.
  • Constructor Details

    • MonitorData

      public MonitorData(Schema schema)
      Builds a MonitorData object by using the provided schema.
      Parameters:
      schema - the schema to use when building the monitor data
  • Method Details

    • add

      public MonitorData add(String attrName, Object attrValue)
      Adds an attribute with the provided name and value.
      Parameters:
      attrName - the attribute name
      attrValue - the attribute value
      Returns:
      This MonitorData object.
    • addAll

      public MonitorData addAll(String attrName, Iterable<?> attrValues)
      Adds an attribute with the provided name and values.
      Parameters:
      attrName - the attribute name
      attrValues - the attribute values
      Returns:
      This MonitorData object.
    • toString

      public String toString()
      Overrides:
      toString in class Object