javax.management.openmbean
Class OpenMBeanParameterInfoSupport
java.lang.Object
|
+--javax.management.MBeanFeatureInfo
|
+--javax.management.MBeanParameterInfo
|
+--javax.management.openmbean.OpenMBeanParameterInfoSupport
- All Implemented Interfaces:
- java.lang.Cloneable, OpenMBeanParameterInfo, java.io.Serializable
- public class OpenMBeanParameterInfoSupport
- extends MBeanParameterInfo
- implements OpenMBeanParameterInfo, java.io.Serializable
Describes a parameter used in one or more operations or constructors of an open MBean
- See Also:
- Serialized Form
Constructor Summary |
OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType)
No validation done for null values is done here. |
OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType,
java.lang.Object defaultValue)
Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name,
openType, description and defaultValue. |
OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType,
java.lang.Object defaultValue,
java.lang.Comparable minValue,
java.lang.Comparable maxValue)
Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans,
with the specified name, openType, description, defaultValue, minValue and maxValue. |
OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType,
java.lang.Object defaultValue,
java.lang.Object[] legalValues)
Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name,
openType, description, defaultValue and legalValues. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
OpenMBeanParameterInfoSupport
public OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType)
- No validation done for null values is done here.
Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans,
with the specified name, openType and description.
- Parameters:
name
- - cannot be a null or empty stringdescription
- - cannot be a null or empty string.openType
- - cannot be null- Throws:
java.lang.IllegalArgumentException
- - if name or description are null or empty string, or openType is null.
OpenMBeanParameterInfoSupport
public OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType,
java.lang.Object defaultValue)
throws OpenDataException
- Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name,
openType, description and defaultValue.
- Parameters:
name
- - cannot be a null or empty string.description
- - cannot be a null or empty string.openType
- - cannot be null.defaultValue
- - must be a valid value for the openType specified for this parameter;
default value not supported for ArrayType and TabularType;
can be null, in which case it means that no default value is set.- Throws:
java.lang.IllegalArgumentException
- - if name or description are null or empty string, or openType is nullOpenDataException
- - if defaultValue is not a valid value for the specified openType, or defaultValue is non null and openType is an ArrayType or a TabularType.
OpenMBeanParameterInfoSupport
public OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType,
java.lang.Object defaultValue,
java.lang.Object[] legalValues)
throws OpenDataException
- Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name,
openType, description, defaultValue and legalValues. The contents of legalValues are internally dumped into an unmodifiable Set, so subsequent modifications of the array referenced
by legalValues have no impact on this OpenMBeanParameterInfoSupport instance
- Parameters:
name
- - cannot be a null or empty string.description
- - cannot be a null or empty string.openType
- - cannot be null.defaultValue
- - must be a valid value for the openType specified for this parameter;
default value not supported for ArrayType and TabularType;
can be null, in which case it means that no default value is set.legalValues
- - each contained value must be valid for the openType specified for this parameter; legal values not supported for ArrayType and TabularType; can be null or empty- Throws:
java.lang.IllegalArgumentException
- - if name or description are null or empty string, or openType is null.OpenDataException
- - if defaultValue is not a valid value for the specified openType, or one value in legalValues is not valid for the specified openType,
or defaultValue is non null and openType is an ArrayType or a TabularType,
or legalValues is non null and non empty and openType is an ArrayType or a TabularType,
or legalValues is non null and non empty and defaultValue is not contained in legalValues.
OpenMBeanParameterInfoSupport
public OpenMBeanParameterInfoSupport(java.lang.String name,
java.lang.String description,
OpenType openType,
java.lang.Object defaultValue,
java.lang.Comparable minValue,
java.lang.Comparable maxValue)
throws OpenDataException
- Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans,
with the specified name, openType, description, defaultValue, minValue and maxValue. It is possible to specify minimal and maximal values only for an open type whose values are Comparable
- Parameters:
name
- - cannot be a null or empty string.description
- - cannot be a null or empty stringopenType
- - cannot be null.defaultValue
- - must be a valid value for the openType specified for this parameter;
default value not supported for ArrayType and TabularType;
can be null, in which case it means that no default value is set.minValue
- - must be valid for the openType specified for this parameter; can be null, in which case it means that no minimal value is set.maxValue
- - must be valid for the openType specified for this parameter; can be null, in which case it means that no maximal value is set.- Throws:
java.lang.IllegalArgumentException
- - if name or description are null or empty string, or openType is null.OpenDataException
- - if defaultValue, minValue or maxValue is not a valid value for the specified openType,
or defaultValue is non null and openType is an ArrayType or a TabularType,
or both minValue and maxValue are non-null 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.
getOpenType
public OpenType getOpenType()
- Specified by:
getOpenType
in interface OpenMBeanParameterInfo
- Returns:
- the open type for the values of the parameter described by this OpenMBeanParameterInfoSupport instance.
getDefaultValue
public java.lang.Object getDefaultValue()
- Specified by:
getDefaultValue
in interface OpenMBeanParameterInfo
- Returns:
- the default value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.
getLegalValues
public java.util.Set getLegalValues()
- Specified by:
getLegalValues
in interface OpenMBeanParameterInfo
- Returns:
- an unmodifiable Set of legal values for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise
getMinValue
public java.lang.Comparable getMinValue()
- Specified by:
getMinValue
in interface OpenMBeanParameterInfo
- Returns:
- the minimal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.
getMaxValue
public java.lang.Comparable getMaxValue()
- Specified by:
getMaxValue
in interface OpenMBeanParameterInfo
- Returns:
- the maximal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.
hasDefaultValue
public boolean hasDefaultValue()
- Specified by:
hasDefaultValue
in interface OpenMBeanParameterInfo
- Returns:
- true if defaultValue is specified (i.e not null) false otherwise
hasLegalValues
public boolean hasLegalValues()
- Specified by:
hasLegalValues
in interface OpenMBeanParameterInfo
- Returns:
- true if legalValues is specified, false if legalValues is null
hasMinValue
public boolean hasMinValue()
- Specified by:
hasMinValue
in interface OpenMBeanParameterInfo
- Returns:
- true if minValue is specified, false if minValue is null
hasMaxValue
public boolean hasMaxValue()
- Specified by:
hasMaxValue
in interface OpenMBeanParameterInfo
- Returns:
- true if maxValue is specified, false if maxValue is null
isValue
public boolean isValue(java.lang.Object obj)
- Tests wether obj is a valid value for the parameter described by this OpenMBeanParameterInfo instance
- Specified by:
isValue
in interface OpenMBeanParameterInfo
- Parameters:
obj
- - the Object to test if is a valid value- Returns:
- true if obj is a valid value false otherwise.
A valid value is determined by
- if openType.isValue(obj) returns true
- if legalValues is present and legalValues.contains(obj) returns true
- if minValue and maxValue compare to obj with minValue being less than obj and maxValue being greater than obj
equals
public boolean equals(java.lang.Object obj)
- Compares the specified obj parameter with this OpenMBeanParameterInfoSupport instance for equality.
- Specified by:
equals
in interface OpenMBeanParameterInfo
- Overrides:
equals
in class MBeanParameterInfo
- Returns:
- true if and only if all of the following statements are true:
- obj is non null
- obj also implements the OpenMBeanParameterInfo interface
- their names are equal
- their open types are equal
- their default, min, max and legal values are equal and if present in this instance msut be present in obj
hashCode
public int hashCode()
- Specified by:
hashCode
in interface OpenMBeanParameterInfo
- Overrides:
hashCode
in class MBeanParameterInfo
toString
public java.lang.String toString()
- Specified by:
toString
in interface OpenMBeanParameterInfo
- Overrides:
toString
in class java.lang.Object
Copyright © 2001-2002 MX4J Team. All Rights Reserved.