| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 . |
|
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 |
hashCode() 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 |
toString() 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 |
---|
public OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs)
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.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}.
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.public OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, Object defaultValue) throws OpenDataException
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.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}.public OpenMBeanAttributeInfoSupport(String name, String description, OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, Object defaultValue, Comparable minValue, Comparable maxValue) throws OpenDataException
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.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}.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.
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.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 |
---|
public boolean equals(Object obj)
Returns {@code true} if and only if all of the following statements are true:
If {@code obj} also implements {@link DescriptorRead}, then its {@link DescriptorRead#getDescriptor() getDescriptor()} method must also return the same value as for this object.
equals
in class MBeanAttributeInfo
obj
- the object to be compared for equality with this
{@code OpenMBeanAttributeInfoSupport} instance.public Object getDefaultValue()
public Set getLegalValues()
public Comparable getMaxValue()
public Comparable getMinValue()
public OpenType getOpenType()
public boolean hasDefaultValue()
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.
hashCode
in class MBeanAttributeInfo
public boolean hasLegalValues()
public boolean hasMaxValue()
public boolean hasMinValue()
public boolean isValue(Object obj)
obj
- the object to be tested.public String toString()
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.
toString
in class MBeanAttributeInfo
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |