javax.management.openmbean
Class OpenMBeanAttributeInfoSupport

java.lang.Object
  |
  +--javax.management.MBeanFeatureInfo
        |
        +--javax.management.MBeanAttributeInfo
              |
              +--javax.management.openmbean.OpenMBeanAttributeInfoSupport
All Implemented Interfaces:
java.lang.Cloneable, OpenMBeanAttributeInfo, OpenMBeanParameterInfo, java.io.Serializable

public class OpenMBeanAttributeInfoSupport
extends MBeanAttributeInfo
implements OpenMBeanAttributeInfo, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
OpenMBeanAttributeInfoSupport(java.lang.String name, java.lang.String description, javax.management.openmbean.OpenType openType, boolean isReadable, boolean isWritable, boolean isIs)
          Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties.
OpenMBeanAttributeInfoSupport(java.lang.String name, java.lang.String description, javax.management.openmbean.OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, java.lang.Object defaultValue)
          Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties and the default value.
OpenMBeanAttributeInfoSupport(java.lang.String name, java.lang.String description, javax.management.openmbean.OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, java.lang.Object defaultValue, java.lang.Comparable minValue, java.lang.Comparable maxValue)
          Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties,default value and legal values as an array
OpenMBeanAttributeInfoSupport(java.lang.String name, java.lang.String description, javax.management.openmbean.OpenType openType, boolean isReadable, boolean isWritable, boolean isIs, java.lang.Object defaultValue, java.lang.Object[] legalValues)
          Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties and the default value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares the give Object for equality with this instance.
 java.lang.Object getDefaultValue()
          Returns the default value, if specified, null otherwise
 java.util.Set getLegalValues()
          Returns the legalValues as a Set
 java.lang.Comparable getMaxValue()
          Returns the maxValue
 java.lang.Comparable getMinValue()
          Returns the minValue
 javax.management.openmbean.OpenType getOpenType()
          Returns the OpenType of this attribute
 boolean hasDefaultValue()
          true if has defaultValue, false otherwise
 int hashCode()
          Computes the hashCode of this OpenMBeanAttributeInfo
 boolean hasLegalValues()
          true if has a legalValues allowed, false otherwise.
 boolean hasMaxValue()
          true if has a maxValue, false otherwise.
 boolean hasMinValue()
          true if has a minValue, false otherwise.
 boolean isValue(java.lang.Object obj)
          Test wether obj is a valid value for this attribute
 java.lang.String toString()
          Returns a string representation of this OpenMBeanAttributeInfo instance.
 
Methods inherited from class javax.management.MBeanAttributeInfo
getType, isIs, isReadable, isWritable
 
Methods inherited from class javax.management.MBeanFeatureInfo
clone, getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.openmbean.OpenMBeanAttributeInfo
isIs, isReadable, isWritable
 
Methods inherited from interface javax.management.openmbean.OpenMBeanParameterInfo
getDescription, getName
 

Constructor Detail

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     javax.management.openmbean.OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs)
Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties.

Parameters:
name - The name of the attribute. Cant be a null.
description - The description of the attribute. Cant be null.
openType - The OpenType representation
isReadable - true if the attribute has a getter exposed.
isWritable - true if the attribute has a setter exposed
isIs - true if the attribute's getter is of the form isXXX.
Throws:
java.lang.IllegalArgumentException - If name or description are null or empty string, or openType is null

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     javax.management.openmbean.OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs,
                                     java.lang.Object defaultValue)
                              throws OpenDataException
Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties and the default value.

Parameters:
name - The name of the attribute. Cant be a null.
description - The description of the attribute. Cant be null.
openType - The OpenType representation
isReadable - true if the attribute has a getter exposed.
isWritable - true if the attribute has a setter exposed
isIs - true if the attribute's getter is of the form isXXX.
defaultValue - The default value of the attribute. Must be a valid value for the OpenType specified. null if no default value is set. ArrayType and TabularType are not supported for a default value.
Throws:
java.lang.IllegalArgumentException - If name or description are null or empty string, or openType is null
OpenDataException - If defaultValue is not of valid type; and default value not supported for ArrayType and TabularType (should be null)

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     javax.management.openmbean.OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs,
                                     java.lang.Object defaultValue,
                                     java.lang.Object[] legalValues)
                              throws OpenDataException
Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties and the default value.

Parameters:
name - The name of the attribute. Cant be a null.
description - The description of the attribute. Cant be null.
openType - The OpenType representation
isReadable - true if the attribute has a getter exposed.
isWritable - true if the attribute has a setter exposed
isIs - true if the attribute's getter is of the form isXXX.
defaultValue - The default value of the attribute. Must be a valid value for the OpenType specified. null if no default value is set. ArrayType and TabularType are not supported for a default value.
legalValues - each value must be a valid value for the OpenType specified. null if no default value is set. ArrayTypr and TabularType are not supported for a legal value (should be null).
Throws:
java.lang.IllegalArgumentException - If name or description are null or empty string, or openType is null
OpenDataException - If defaultValue is not of valid type; and default value not supported for ArrayType and TabularType (should be null)

OpenMBeanAttributeInfoSupport

public OpenMBeanAttributeInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     javax.management.openmbean.OpenType openType,
                                     boolean isReadable,
                                     boolean isWritable,
                                     boolean isIs,
                                     java.lang.Object defaultValue,
                                     java.lang.Comparable minValue,
                                     java.lang.Comparable maxValue)
                              throws OpenDataException
Constructs an OpenMBeanAttributeInfoSupport which is an OpenMBean with the specified name,OpenType, description and and the specified read/write access properties,default value and legal values as an array

Parameters:
name - The name of the attribute. Cant be a null.
description - The description of the attribute. Cant be null.
openType - The OpenType representation
isReadable - true if the attribute has a getter exposed.
isWritable - true if the attribute has a setter exposed
isIs - true if the attribute's getter is of the form isXXX.
defaultValue - The default value of the attribute. Must be a valid value for the OpenType specified. null if no default
minValue - must be a valid OpenType specified for this attribute. Can be null, which means no minimal value for the attribute.
maxValue - must be a valid OpenType specified for this attribute. Can be null, which means no miximal value for the attribute.
Throws:
java.lang.IllegalArgumentException - If name or description are null or empty string, or openType is null
OpenDataException - If defaultValue is not of valid type; and default value not supported for ArrayType and Tabular (should be null). If minValue and maxValue is not a valid value for specified OpenType. If minValue and maxValue are non-null and OpenType and minValue.compareTo(maxValue) > 0 is true, or both defaultValue and minValue are non-null and minValue.compareTo(defaultValue) >0 is true, or both defaultValue and maxValue are non-null and defaultValue.compareTo(maxValue) >0 is true
Method Detail

getOpenType

public javax.management.openmbean.OpenType getOpenType()
Returns the OpenType of this attribute

Specified by:
getOpenType in interface OpenMBeanParameterInfo

getDefaultValue

public java.lang.Object getDefaultValue()
Returns the default value, if specified, null otherwise

Specified by:
getDefaultValue in interface OpenMBeanParameterInfo

getLegalValues

public java.util.Set getLegalValues()
Returns the legalValues as a Set

Specified by:
getLegalValues in interface OpenMBeanParameterInfo

getMinValue

public java.lang.Comparable getMinValue()
Returns the minValue

Specified by:
getMinValue in interface OpenMBeanParameterInfo

getMaxValue

public java.lang.Comparable getMaxValue()
Returns the maxValue

Specified by:
getMaxValue in interface OpenMBeanParameterInfo

hasDefaultValue

public boolean hasDefaultValue()
true if has defaultValue, false otherwise

Specified by:
hasDefaultValue in interface OpenMBeanParameterInfo

hasLegalValues

public boolean hasLegalValues()
true if has a legalValues allowed, false otherwise.

Specified by:
hasLegalValues in interface OpenMBeanParameterInfo

hasMinValue

public boolean hasMinValue()
true if has a minValue, false otherwise.

Specified by:
hasMinValue in interface OpenMBeanParameterInfo

hasMaxValue

public boolean hasMaxValue()
true if has a maxValue, false otherwise.

Specified by:
hasMaxValue in interface OpenMBeanParameterInfo

isValue

public boolean isValue(java.lang.Object obj)
Test wether obj is a valid value for this attribute

Specified by:
isValue in interface OpenMBeanParameterInfo
Parameters:
obj - The object being tested
Returns:
true If a valid value

equals

public boolean equals(java.lang.Object obj)
Compares the give Object for equality with this instance.

The operation returns true if and only if the following statements are all true:

Specified by:
equals in interface OpenMBeanAttributeInfo
Overrides:
equals in class MBeanAttributeInfo
Returns:
boolean true if the above conditions are met

hashCode

public int hashCode()
Computes the hashCode of this OpenMBeanAttributeInfo

Specified by:
hashCode in interface OpenMBeanAttributeInfo
Overrides:
hashCode in class MBeanAttributeInfo
Returns:
int The hashCode value

toString

public java.lang.String toString()
Returns a string representation of this OpenMBeanAttributeInfo instance.

Specified by:
toString in interface OpenMBeanAttributeInfo
Overrides:
toString in class java.lang.Object
Returns:
String The representation as string