Class MonitorAttribute

java.lang.Object
com.unboundid.ldap.sdk.unboundidds.monitors.MonitorAttribute
All Implemented Interfaces:
Serializable

This class provides a data structure for providing information about the data presented in an attribute in a Directory Server monitor entry. It includes a human-readable display name, a human-readable description, a class that represents the data type for the values, and the set of values.
NOTE: This class, and other classes within the com.unboundid.ldap.sdk.unboundidds package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
See Also:
  • Constructor Details

    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Boolean value)
      Creates a new monitor attribute with the provided information. It will have a single Boolean value.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      value - The Boolean value for this monitor attribute. It must not be null.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Date value)
      Creates a new monitor attribute with the provided information. It will have a single Date value.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      value - The Date value for this monitor attribute. It must not be null.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Date[] values)
      Creates a new monitor attribute with the provided information. It will have one or more Date values.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      values - The set of Date values for this monitor attribute. It must not be null or empty.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Double value)
      Creates a new monitor attribute with the provided information. It will have a single Double value.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      value - The Double value for this monitor attribute. It must not be null.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Double[] values)
      Creates a new monitor attribute with the provided information. It will have one or more Double values.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      values - The set of Double values for this monitor attribute. It must not be null or empty.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Integer value)
      Creates a new monitor attribute with the provided information. It will have a single Long value.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      value - The Integer value for this monitor attribute. It must not be null.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Integer[] values)
      Creates a new monitor attribute with the provided information. It will have a single Long value.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      values - The set of Integer values for this monitor attribute. It must not be null or empty.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Long value)
      Creates a new monitor attribute with the provided information. It will have a single Long value.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      value - The Long value for this monitor attribute. It must not be null.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull Long[] values)
      Creates a new monitor attribute with the provided information. It will have one or more Long values.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      values - The set of Long values for this monitor attribute. It must not be null or empty.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull String value)
      Creates a new monitor attribute with the provided information. It will have a single String value.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      value - The String value for this monitor attribute. It must not be null.
    • MonitorAttribute

      public MonitorAttribute(@NotNull String name, @NotNull String displayName, @Nullable String description, @NotNull String[] values)
      Creates a new monitor attribute with the provided information. It will have one or more String values.
      Parameters:
      name - The name used to identify this monitor attribute. It must not be null.
      displayName - The human-readable display name for this monitor attribute. It must not be null.
      description - A human-readable description for this monitor attribute. It may be null if no description is available.
      values - The set of String values for this monitor attribute. It must not be null or empty.
  • Method Details

    • getName

      Retrieves the name used to identify this monitor attribute. It is not necessarily human-readable, but it should be used as the key for this monitor attribute in the map returned by the MonitorEntry.getMonitorAttributes method.
      Returns:
      The name used to identify this monitor attribute.
    • getDisplayName

      Retrieves the human-readable display name for this monitor attribute.
      Returns:
      The human-readable display name for this monitor attribute.
    • getDescription

      Retrieves the human-readable description for this monitor attribute, if available.
      Returns:
      The human-readable description for this monitor attribute, or null if none is available.
    • getDataType

      @NotNull public Class<?> getDataType()
      Retrieves the class representing the data type for this monitor attribute. It will be one of the following class types: Boolean, Date, Double, Long, or String.
      Returns:
      The class representing the data type for this monitor attribute.
    • hasMultipleValues

      public boolean hasMultipleValues()
      Indicates whether this monitor attribute has multiple values.
      Returns:
      true if this monitor attribute has more than one value, or false if not.
    • getValue

      Retrieves the value for this monitor attribute as an Object. If it has multiple values, then the first will be returned.
      Returns:
      The value for this monitor attribute as an Object.
    • getValues

      Retrieves the set of values for this monitor attribute as a list of Objects.
      Returns:
      The set of values for this monitor attribute as a list of Objects.
    • getBooleanValue

      Retrieves the value for this monitor attribute as a Boolean object.
      Returns:
      The value for this monitor attribute as a Boolean object.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Boolean.
    • getDateValue

      Retrieves the value for this monitor attribute as a Date object.
      Returns:
      The value for this monitor attribute as a Date object.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Date.
    • getDateValues

      Retrieves the values for this monitor attribute as a list of Date objects.
      Returns:
      The values for this monitor attribute as a list of Date objects.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Date.
    • getDoubleValue

      Retrieves the value for this monitor attribute as a Double object.
      Returns:
      The value for this monitor attribute as a Double object.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Double.
    • getDoubleValues

      Retrieves the values for this monitor attribute as a list of Double objects.
      Returns:
      The values for this monitor attribute as a list of Double objects.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Double.
    • getIntegerValue

      Retrieves the value for this monitor attribute as an Integer object.
      Returns:
      The value for this monitor attribute as an Integer object.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Integer.
    • getIntegerValues

      Retrieves the values for this monitor attribute as a list of Integer objects.
      Returns:
      The values for this monitor attribute as a list of Integer objects.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Integer.
    • getLongValue

      Retrieves the value for this monitor attribute as a Long object.
      Returns:
      The value for this monitor attribute as a Long object.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Long.
    • getLongValues

      Retrieves the values for this monitor attribute as a list of Long objects.
      Returns:
      The values for this monitor attribute as a list of Long objects.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not Long.
    • getStringValue

      Retrieves the value for this monitor attribute as a String object.
      Returns:
      The value for this monitor attribute as a String object.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not String.
    • getStringValues

      Retrieves the values for this monitor attribute as a list of String objects.
      Returns:
      The values for this monitor attribute as a list of String objects.
      Throws:
      ClassCastException - If the data type for this monitor attribute is not String.
    • toString

      Retrieves a string representation of this monitor attribute.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this monitor attribute.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of this monitor attribute to the provided buffer.
      Parameters:
      buffer - The buffer to which the string representation should be appended.