com.unboundid.ldap.sdk.unboundidds.monitors
Class MonitorAttribute

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

@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class MonitorAttribute
extends java.lang.Object
implements java.io.Serializable

NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.
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.

See Also:
Serialized Form

Constructor Summary
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Boolean value)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.util.Date value)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.util.Date[] values)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Double value)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Double[] values)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Integer value)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Integer[] values)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Long value)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Long[] values)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.String value)
          Creates a new monitor attribute with the provided information.
MonitorAttribute(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.String[] values)
          Creates a new monitor attribute with the provided information.
 
Method Summary
 java.lang.Boolean getBooleanValue()
          Retrieves the value for this monitor attribute as a Boolean object.
 java.lang.Class<?> getDataType()
          Retrieves the class representing the data type for this monitor attribute.
 java.util.Date getDateValue()
          Retrieves the value for this monitor attribute as a Date object.
 java.util.List<java.util.Date> getDateValues()
          Retrieves the values for this monitor attribute as a list of Date objects.
 java.lang.String getDescription()
          Retrieves the human-readable description for this monitor attribute, if available.
 java.lang.String getDisplayName()
          Retrieves the human-readable display name for this monitor attribute.
 java.lang.Double getDoubleValue()
          Retrieves the value for this monitor attribute as a Double object.
 java.util.List<java.lang.Double> getDoubleValues()
          Retrieves the values for this monitor attribute as a list of Double objects.
 java.lang.Integer getIntegerValue()
          Retrieves the value for this monitor attribute as an Integer object.
 java.util.List<java.lang.Integer> getIntegerValues()
          Retrieves the values for this monitor attribute as a list of Integer objects.
 java.lang.Long getLongValue()
          Retrieves the value for this monitor attribute as a Long object.
 java.util.List<java.lang.Long> getLongValues()
          Retrieves the values for this monitor attribute as a list of Long objects.
 java.lang.String getName()
          Retrieves the name used to identify this monitor attribute.
 java.lang.String getStringValue()
          Retrieves the value for this monitor attribute as a String object.
 java.util.List<java.lang.String> getStringValues()
          Retrieves the values for this monitor attribute as a list of String objects.
 java.lang.Object getValue()
          Retrieves the value for this monitor attribute as an Object.
 java.util.List<java.lang.Object> getValues()
          Retrieves the set of values for this monitor attribute as a list of Objects.
 boolean hasMultipleValues()
          Indicates whether this monitor attribute has multiple values.
 java.lang.String toString()
          Retrieves a string representation of this monitor attribute.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this monitor attribute to the provided buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonitorAttribute

public MonitorAttribute(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.util.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.util.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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(java.lang.String name,
                        java.lang.String displayName,
                        java.lang.String description,
                        java.lang.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 Detail

getName

public java.lang.String 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

public java.lang.String getDisplayName()
Retrieves the human-readable display name for this monitor attribute.

Returns:
The human-readable display name for this monitor attribute.

getDescription

public java.lang.String 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

public java.lang.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

public java.lang.Object 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

public java.util.List<java.lang.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

public java.lang.Boolean getBooleanValue()
                                  throws java.lang.ClassCastException
Retrieves the value for this monitor attribute as a Boolean object.

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

getDateValue

public java.util.Date getDateValue()
                            throws java.lang.ClassCastException
Retrieves the value for this monitor attribute as a Date object.

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

getDateValues

public java.util.List<java.util.Date> getDateValues()
                                             throws java.lang.ClassCastException
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:
java.lang.ClassCastException - If the data type for this monitor attribute is not Date.

getDoubleValue

public java.lang.Double getDoubleValue()
                                throws java.lang.ClassCastException
Retrieves the value for this monitor attribute as a Double object.

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

getDoubleValues

public java.util.List<java.lang.Double> getDoubleValues()
                                                 throws java.lang.ClassCastException
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:
java.lang.ClassCastException - If the data type for this monitor attribute is not Double.

getIntegerValue

public java.lang.Integer getIntegerValue()
                                  throws java.lang.ClassCastException
Retrieves the value for this monitor attribute as an Integer object.

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

getIntegerValues

public java.util.List<java.lang.Integer> getIntegerValues()
                                                   throws java.lang.ClassCastException
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:
java.lang.ClassCastException - If the data type for this monitor attribute is not Integer.

getLongValue

public java.lang.Long getLongValue()
                            throws java.lang.ClassCastException
Retrieves the value for this monitor attribute as a Long object.

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

getLongValues

public java.util.List<java.lang.Long> getLongValues()
                                             throws java.lang.ClassCastException
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:
java.lang.ClassCastException - If the data type for this monitor attribute is not Long.

getStringValue

public java.lang.String getStringValue()
                                throws java.lang.ClassCastException
Retrieves the value for this monitor attribute as a String object.

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

getStringValues

public java.util.List<java.lang.String> getStringValues()
                                                 throws java.lang.ClassCastException
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:
java.lang.ClassCastException - If the data type for this monitor attribute is not String.

toString

public java.lang.String toString()
Retrieves a string representation of this monitor attribute.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this monitor attribute.

toString

public void toString(java.lang.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.