This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management.openmbean
class OpenMBeanAttributeInfoSupport

java.lang.Object extended by javax.management.MBeanFeatureInfo extended by javax.management.MBeanAttributeInfo extended by javax.management.openmbean.OpenMBeanAttributeInfoSupport
All Implemented Interfaces:
Serializable, Cloneable, DescriptorRead, OpenMBeanAttributeInfo

public class OpenMBeanAttributeInfoSupport
extends MBeanAttributeInfo
implements OpenMBeanAttributeInfo

Describes an attribute of an open MBean.


Field Summary
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary
OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs)

          Constructs an instance, which describes the attribute of an open MBean with the specified , and , and the specified read/write access properties.
OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, Descriptor descriptor)

          Constructs an instance, which describes the attribute of an open MBean with the specified , , , read/write access properties, and .
OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, Object defaultValue)

          Constructs an instance, which describes the attribute of an open MBean with the specified , , and , and the specified read/write access properties.
OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, Object defaultValue, Comparable minValue, Comparable maxValue)

          Constructs an instance, which describes the attribute of an open MBean, with the specified , , , , and .
OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, Object defaultValue, Object[] legalValues)

          Constructs an instance, which describes the attribute of an open MBean with the specified , , , and , and the specified read/write access properties.
 
Method Summary
 boolean

          Compares the specified parameter with this instance for equality.
 Object

          Returns the default value for the attribute described by this instance, if specified, or otherwise.
 Set

          Returns an unmodifiable Set of legal values for the attribute described by this instance, if specified, or otherwise.
 Comparable

          Returns the maximal value for the attribute described by this instance, if specified, or otherwise.
 Comparable

          Returns the minimal value for the attribute described by this instance, if specified, or otherwise.
 OpenType

          Returns the open type for the values of the attribute described by this instance.
 boolean

          Returns if this instance specifies a non-null default value for the described attribute, otherwise.
 int

          Returns the hash code value for this instance.
 boolean

          Returns if this instance specifies a non-null set of legal values for the described attribute, otherwise.
 boolean

          Returns if this instance specifies a non-null maximal value for the described attribute, otherwise.
 boolean

          Returns if this instance specifies a non-null minimal value for the described attribute, otherwise.
 boolean

          Tests whether is a valid value for the attribute described by this instance.
 String

          Returns a string representation of this instance.
 
Methods inherited from class javax.management.MBeanAttributeInfo
clone, equals, getType, hashCode, isIs, isReadable, isWritable, toString
 
Methods inherited from class javax.management.MBeanFeatureInfo
equals, getDescription, getDescriptor, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs)
Constructs an {@code OpenMBeanAttributeInfoSupport} instance, which describes the attribute of an open MBean with the specified {@code name}, {@code openType} and {@code description}, and the specified read/write access properties.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
isReadable - {@code true} if the attribute has a getter exposed for management.
isWritable - {@code true} if the attribute has a setter exposed for management.
isIs - {@code true} if the attribute's getter is of the form isXXX.

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs,
                                     Descriptor descriptor)

Constructs an {@code OpenMBeanAttributeInfoSupport} instance, which describes the attribute of an open MBean with the specified {@code name}, {@code openType}, {@code description}, read/write access properties, and {@code Descriptor}.

The {@code descriptor} can contain entries that will define the values returned by certain methods of this class, as explained in the {@link package description}.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
isReadable - {@code true} if the attribute has a getter exposed for management.
isWritable - {@code true} if the attribute has a setter exposed for management.
isIs - {@code true} if the attribute's getter is of the form isXXX.
descriptor - The descriptor for the attribute. This may be null which is equivalent to an empty descriptor.

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs,
                                     Object defaultValue)
                              throws OpenDataException
Constructs an {@code OpenMBeanAttributeInfoSupport} instance, which describes the attribute of an open MBean with the specified {@code name}, {@code openType}, {@code description} and {@code defaultValue}, and the specified read/write access properties.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
isReadable - {@code true} if the attribute has a getter exposed for management.
isWritable - {@code true} if the attribute has a setter exposed for management.
isIs - {@code true} if the attribute's getter is of the form isXXX.
defaultValue - must be a valid value for the {@code openType} specified for this attribute; default value not supported for {@code ArrayType} and {@code TabularType}; can be null, in which case it means that no default value is set.
Throws:
OpenDataException - if {@code defaultValue} is not a valid value for the specified {@code openType}, or {@code defaultValue} is non null and {@code openType} is an {@code ArrayType} or a {@code TabularType}.

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs,
                                     Object defaultValue,
                                     Comparable minValue,
                                     Comparable maxValue)
                              throws OpenDataException
Constructs an {@code OpenMBeanAttributeInfoSupport} instance, which describes the attribute of an open MBean, with the specified {@code name}, {@code openType}, {@code description}, {@code defaultValue}, {@code minValue} and {@code maxValue}. It is possible to specify minimal and maximal values only for an open type whose values are {@code Comparable}.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
isReadable - {@code true} if the attribute has a getter exposed for management.
isWritable - {@code true} if the attribute has a setter exposed for management.
isIs - {@code true} if the attribute's getter is of the form isXXX.
defaultValue - must be a valid value for the {@code openType} specified for this attribute; default value not supported for {@code ArrayType} and {@code TabularType}; can be null, in which case it means that no default value is set.
minValue - must be valid for the {@code openType} specified for this attribute; can be null, in which case it means that no minimal value is set.
maxValue - must be valid for the {@code openType} specified for this attribute; can be null, in which case it means that no maximal value is set.
Throws:
OpenDataException - if {@code defaultValue}, {@code minValue} or {@code maxValue} is not a valid value for the specified {@code openType}, or {@code defaultValue} is non null and {@code openType} is an {@code ArrayType} or a {@code TabularType}, or both {@code minValue} and {@code maxValue} are non-null and {@code minValue.compareTo(maxValue) > 0} is {@code true}, or both {@code defaultValue} and {@code minValue} are non-null and {@code minValue.compareTo(defaultValue) > 0} is {@code true}, or both {@code defaultValue} and {@code maxValue} are non-null and {@code defaultValue.compareTo(maxValue) > 0} is {@code true}.

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs,
                                     Object defaultValue,
                                     Object[] legalValues)
                              throws OpenDataException

Constructs an {@code OpenMBeanAttributeInfoSupport} instance, which describes the attribute of an open MBean with the specified {@code name}, {@code openType}, {@code description}, {@code defaultValue} and {@code legalValues}, and the specified read/write access properties.

The contents of {@code legalValues} are copied, so subsequent modifications of the array referenced by {@code legalValues} have no impact on this {@code OpenMBeanAttributeInfoSupport} instance.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
isReadable - {@code true} if the attribute has a getter exposed for management.
isWritable - {@code true} if the attribute has a setter exposed for management.
isIs - {@code true} if the attribute's getter is of the form isXXX.
defaultValue - must be a valid value for the {@code openType} specified for this attribute; default value not supported for {@code ArrayType} and {@code TabularType}; can be null, in which case it means that no default value is set.
legalValues - each contained value must be valid for the {@code openType} specified for this attribute; legal values not supported for {@code ArrayType} and {@code TabularType}; can be null or empty.
Throws:
OpenDataException - if {@code defaultValue} is not a valid value for the specified {@code openType}, or one value in {@code legalValues} is not valid for the specified {@code openType}, or {@code defaultValue} is non null and {@code openType} is an {@code ArrayType} or a {@code TabularType}, or {@code legalValues} is non null and non empty and {@code openType} is an {@code ArrayType} or a {@code TabularType}, or {@code legalValues} is non null and non empty and {@code defaultValue} is not contained in {@code legalValues}.
Method Detail

equals

public boolean equals(Object obj)
Compares the specified {@code obj} parameter with this {@code OpenMBeanAttributeInfoSupport} instance for equality.

Returns {@code true} if and only if all of the following statements are true:

This ensures that this {@code equals} method works properly for {@code obj} parameters which are different implementations of the {@code OpenMBeanAttributeInfo} interface.

If {@code obj} also implements {@link DescriptorRead}, then its {@link DescriptorRead#getDescriptor() getDescriptor()} method must also return the same value as for this object.

Overrides:
equals in class MBeanAttributeInfo
Parameters:
obj - the object to be compared for equality with this {@code OpenMBeanAttributeInfoSupport} instance.
Returns:
{@code true} if the specified object is equal to this {@code OpenMBeanAttributeInfoSupport} instance.

getDefaultValue

public Object getDefaultValue()
Returns the default value for the attribute described by this {@code OpenMBeanAttributeInfoSupport} instance, if specified, or {@code null} otherwise.


getLegalValues

public Set getLegalValues()
Returns an unmodifiable Set of legal values for the attribute described by this {@code OpenMBeanAttributeInfoSupport} instance, if specified, or {@code null} otherwise.


getMaxValue

public Comparable getMaxValue()
Returns the maximal value for the attribute described by this {@code OpenMBeanAttributeInfoSupport} instance, if specified, or {@code null} otherwise.


getMinValue

public Comparable getMinValue()
Returns the minimal value for the attribute described by this {@code OpenMBeanAttributeInfoSupport} instance, if specified, or {@code null} otherwise.


getOpenType

public OpenType getOpenType()
Returns the open type for the values of the attribute described by this {@code OpenMBeanAttributeInfoSupport} instance.


hasDefaultValue

public boolean hasDefaultValue()
Returns {@code true} if this {@code OpenMBeanAttributeInfoSupport} instance specifies a non-null default value for the described attribute, {@code false} otherwise.


hashCode

public int hashCode()

Returns the hash code value for this {@code OpenMBeanAttributeInfoSupport} instance.

The hash code of an {@code OpenMBeanAttributeInfoSupport} instance is the sum of the hash codes of all elements of information used in {@code equals} comparisons (ie: its name, its open type, its default, min, max and legal values, and its Descriptor).

This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()} for any two {@code OpenMBeanAttributeInfoSupport} instances {@code t1} and {@code t2}, as required by the general contract of the method {@link Object#hashCode() Object.hashCode()}.

However, note that another instance of a class implementing the {@code OpenMBeanAttributeInfo} interface may be equal to this {@code OpenMBeanAttributeInfoSupport} instance as defined by {@link #equals(java.lang.Object)}, but may have a different hash code if it is calculated differently.

As {@code OpenMBeanAttributeInfoSupport} instances are immutable, the hash code for this instance is calculated once, on the first call to {@code hashCode}, and then the same value is returned for subsequent calls.

Overrides:
hashCode in class MBeanAttributeInfo
Returns:
the hash code value for this {@code OpenMBeanAttributeInfoSupport} instance

hasLegalValues

public boolean hasLegalValues()
Returns {@code true} if this {@code OpenMBeanAttributeInfoSupport} instance specifies a non-null set of legal values for the described attribute, {@code false} otherwise.


hasMaxValue

public boolean hasMaxValue()
Returns {@code true} if this {@code OpenMBeanAttributeInfoSupport} instance specifies a non-null maximal value for the described attribute, {@code false} otherwise.


hasMinValue

public boolean hasMinValue()
Returns {@code true} if this {@code OpenMBeanAttributeInfoSupport} instance specifies a non-null minimal value for the described attribute, {@code false} otherwise.


isValue

public boolean isValue(Object obj)
Tests whether {@code obj} is a valid value for the attribute described by this {@code OpenMBeanAttributeInfoSupport} instance.

Parameters:
obj - the object to be tested.
Returns:
{@code true} if {@code obj} is a valid value for the parameter described by this {@code OpenMBeanAttributeInfoSupport} instance, {@code false} otherwise.

toString

public String toString()
Returns a string representation of this {@code OpenMBeanAttributeInfoSupport} instance.

The string representation consists of the name of this class (i.e. {@code javax.management.openmbean.OpenMBeanAttributeInfoSupport}), the string representation of the name and open type of the described parameter, the string representation of its default, min, max and legal values and the string representation of its descriptor.

As {@code OpenMBeanAttributeInfoSupport} instances are immutable, the string representation for this instance is calculated once, on the first call to {@code toString}, and then the same value is returned for subsequent calls.

Overrides:
toString in class MBeanAttributeInfo
Returns:
a string representation of this {@code OpenMBeanAttributeInfoSupport} instance.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.