javax.management.openmbean
Class OpenMBeanParameterInfoSupport

java.lang.Object
  extended byjavax.management.MBeanFeatureInfo (src) 
      extended byjavax.management.MBeanParameterInfo (src) 
          extended byjavax.management.openmbean.OpenMBeanParameterInfoSupport
All Implemented Interfaces:
java.lang.Cloneable, OpenMBeanParameterInfo (src) , java.io.Serializable

public class OpenMBeanParameterInfoSupport
extends MBeanParameterInfo (src)
implements OpenMBeanParameterInfo (src) , java.io.Serializable

OpenMBeanParameterInfo implementation

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.management.MBeanFeatureInfo (src)
description, name
 
Constructor Summary
OpenMBeanParameterInfoSupport(java.lang.String name, java.lang.String description, OpenType (src)  openType)
          Contruct an OpenMBeanParameterInfoSupport
OpenMBeanParameterInfoSupport(java.lang.String name, java.lang.String description, OpenType (src)  openType, java.lang.Object defaultValue)
          Contruct an OpenMBeanParameterInfoSupport
OpenMBeanParameterInfoSupport(java.lang.String name, java.lang.String description, OpenType (src)  openType, java.lang.Object defaultValue, java.lang.Comparable minValue, java.lang.Comparable maxValue)
          Contruct an OpenMBeanParameterInfoSupport
OpenMBeanParameterInfoSupport(java.lang.String name, java.lang.String description, OpenType (src)  openType, java.lang.Object defaultValue, java.lang.Object[] legalValues)
          Contruct an OpenMBeanParameterInfoSupport
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares an object for equality with the implementing class.
 java.lang.Object getDefaultValue()
          Retrieve the default value for this parameter or null if there is no default
 java.util.Set getLegalValues()
          Retrieve the legal values values for this parameter or null if this is not specified
 java.lang.Comparable getMaxValue()
          Retrieve the maximum values values for this parameter or null if this is not specified
 java.lang.Comparable getMinValue()
          Retrieve the minimum values values for this parameter or null if this is not specified
 OpenType (src) getOpenType()
          Retrieve the open type for this parameter
 boolean hasDefaultValue()
          Discover wether this parameter has a default value specified
 int hashCode()
          Generates a hashcode for the implementation.
 boolean hasLegalValues()
          Discover wether this parameter has legal values specified
 boolean hasMaxValue()
          Discover wether this parameter has a maximum value specified
 boolean hasMinValue()
          Discover wether this parameter has a minimum value specified
 boolean isValue(java.lang.Object obj)
          Tests whether an object is acceptable as a paramter value
 java.lang.String toString()
          A string representation of the open mbean parameter info.
 
Methods inherited from class javax.management.MBeanParameterInfo (src)
clone, getType
 
Methods inherited from class javax.management.MBeanFeatureInfo (src)
getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.openmbean.OpenMBeanParameterInfo (src)
getDescription, getName
 

Constructor Detail

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     OpenType (src)  openType)
Contruct an OpenMBeanParameterInfoSupport

Parameters:
name - cannot be null or empty
description - cannot be null or empty
openType - cannot be null
Throws:
java.lang.IllegalArgumentException - when one of the above constraints is not satisfied

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     OpenType (src)  openType,
                                     java.lang.Object defaultValue)
                              throws OpenDataException (src) 
Contruct an OpenMBeanParameterInfoSupport

Parameters:
name - cannot be null or empty
description - cannot be null or empty
openType - cannot be null
defaultValue - the default value
Throws:
java.lang.IllegalArgumentException - when one of the above constraints is not satisfied
OpenDataException (src) - when default value is not correct for the open type or cannot specify a default value for ArrayType and TabularType

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     OpenType (src)  openType,
                                     java.lang.Object defaultValue,
                                     java.lang.Object[] legalValues)
                              throws OpenDataException (src) 
Contruct an OpenMBeanParameterInfoSupport

Parameters:
name - cannot be null or empty
description - cannot be null or empty
openType - cannot be null
defaultValue - the default value
legalValues - an array of legal values
Throws:
java.lang.IllegalArgumentException - when one of the above constraints is not satisfied
OpenDataException (src)

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(java.lang.String name,
                                     java.lang.String description,
                                     OpenType (src)  openType,
                                     java.lang.Object defaultValue,
                                     java.lang.Comparable minValue,
                                     java.lang.Comparable maxValue)
                              throws OpenDataException (src) 
Contruct an OpenMBeanParameterInfoSupport

Parameters:
name - cannot be null or empty
description - cannot be null or empty
openType - cannot be null
defaultValue - the default value
minValue - the minimum value
maxValue - the maximum value
Throws:
java.lang.IllegalArgumentException - when one of the above constraints is not satisfied
OpenDataException (src)
Method Detail

getDefaultValue

public java.lang.Object getDefaultValue()
Description copied from interface: OpenMBeanParameterInfo (src)
Retrieve the default value for this parameter or null if there is no default

Specified by:
getDefaultValue in interface OpenMBeanParameterInfo (src)
Returns:
the default value

getLegalValues

public java.util.Set getLegalValues()
Description copied from interface: OpenMBeanParameterInfo (src)
Retrieve the legal values values for this parameter or null if this is not specified

Specified by:
getLegalValues in interface OpenMBeanParameterInfo (src)
Returns:
the legal value

getMinValue

public java.lang.Comparable getMinValue()
Description copied from interface: OpenMBeanParameterInfo (src)
Retrieve the minimum values values for this parameter or null if this is not specified

Specified by:
getMinValue in interface OpenMBeanParameterInfo (src)
Returns:
the minimum value

getMaxValue

public java.lang.Comparable getMaxValue()
Description copied from interface: OpenMBeanParameterInfo (src)
Retrieve the maximum values values for this parameter or null if this is not specified

Specified by:
getMaxValue in interface OpenMBeanParameterInfo (src)
Returns:
the maximum value

getOpenType

public OpenType (src)  getOpenType()
Description copied from interface: OpenMBeanParameterInfo (src)
Retrieve the open type for this parameter

Specified by:
getOpenType in interface OpenMBeanParameterInfo (src)
Returns:
the open type.

hasDefaultValue

public boolean hasDefaultValue()
Description copied from interface: OpenMBeanParameterInfo (src)
Discover wether this parameter has a default value specified

Specified by:
hasDefaultValue in interface OpenMBeanParameterInfo (src)
Returns:
true when a default value is specified or false otherwise

hasLegalValues

public boolean hasLegalValues()
Description copied from interface: OpenMBeanParameterInfo (src)
Discover wether this parameter has legal values specified

Specified by:
hasLegalValues in interface OpenMBeanParameterInfo (src)
Returns:
true when the legal values are specified or false otherwise

hasMinValue

public boolean hasMinValue()
Description copied from interface: OpenMBeanParameterInfo (src)
Discover wether this parameter has a minimum value specified

Specified by:
hasMinValue in interface OpenMBeanParameterInfo (src)
Returns:
true when a minimum value is specified or false otherwise

hasMaxValue

public boolean hasMaxValue()
Description copied from interface: OpenMBeanParameterInfo (src)
Discover wether this parameter has a maximum value specified

Specified by:
hasMaxValue in interface OpenMBeanParameterInfo (src)
Returns:
true when a maximum value is specified or false otherwise

isValue

public boolean isValue(java.lang.Object obj)
Description copied from interface: OpenMBeanParameterInfo (src)
Tests whether an object is acceptable as a paramter value

Specified by:
isValue in interface OpenMBeanParameterInfo (src)
Parameters:
obj - the object to test
Returns:
true when it is a valid value, or false otherwise

equals

public boolean equals(java.lang.Object obj)
Description copied from interface: OpenMBeanParameterInfo (src)
Compares an object for equality with the implementing class.

The object is not null
The object implements the open mbean attribute info interface
The parameter names are equal
The open types are equal
The default, min, max and legal values are equal

Specified by:
equals in interface OpenMBeanParameterInfo (src)
Overrides:
equals in class MBeanParameterInfo (src)

hashCode

public int hashCode()
Description copied from interface: OpenMBeanParameterInfo (src)
Generates a hashcode for the implementation.

The sum of the hashCodes for the elements mentioned in the equals method

Specified by:
hashCode in interface OpenMBeanParameterInfo (src)
Overrides:
hashCode in class MBeanParameterInfo (src)

toString

public java.lang.String toString()
Description copied from interface: OpenMBeanParameterInfo (src)
A string representation of the open mbean parameter info.

It is made up of implementation class and the values mentioned in the equals method

Specified by:
toString in interface OpenMBeanParameterInfo (src)
Overrides:
toString in class MBeanParameterInfo (src)
Returns:
a human readable string