站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

OpenMBeanParameterInfoSupport (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management.openmbean
Class OpenMBeanParameterInfoSupport

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

public class OpenMBeanParameterInfoSupport
extends MBeanParameterInfo
implements OpenMBeanParameterInfo, Serializable

OpenMBeanParameterInfo implementation

Version:
$Revision: 1.4 $
Author:
Adrian Brock.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType)
          Contruct an OpenMBeanParameterInfoSupport
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue)
          Contruct an OpenMBeanParameterInfoSupport
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue, Comparable minValue, Comparable maxValue)
          Contruct an OpenMBeanParameterInfoSupport
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue, Object[] legalValues)
          Contruct an OpenMBeanParameterInfoSupport
 
Method Summary
 boolean equals(Object obj)
          Compares an object for equality with the implementing class.
 Object getDefaultValue()
          Retrieve the default value for this parameter or null if there is no default
 Set getLegalValues()
          Retrieve the legal values values for this parameter or null if this is not specified
 Comparable getMaxValue()
          Retrieve the maximum values values for this parameter or null if this is not specified
 Comparable getMinValue()
          Retrieve the minimum values values for this parameter or null if this is not specified
 OpenType 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(Object obj)
          Tests whether an object is acceptable as a paramter value
 String toString()
          A string representation of the open mbean parameter info.
 
Methods inherited from class javax.management.MBeanParameterInfo
clone, getType
 
Methods inherited from class javax.management.MBeanFeatureInfo
getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.openmbean.OpenMBeanParameterInfo
getDescription, getName
 

Constructor Detail

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType)
Contruct an OpenMBeanParameterInfoSupport

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

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     Object defaultValue)
                              throws OpenDataException
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:
IllegalArgumentException - when one of the above constraints is not satisfied
OpenDataException - when default value is not correct for the open type or cannot specify a default value for ArrayType and TabularType

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     Object defaultValue,
                                     Object[] legalValues)
                              throws OpenDataException
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:
IllegalArgumentException - when one of the above constraints is not satisfied
OpenDataException

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     Object defaultValue,
                                     Comparable minValue,
                                     Comparable maxValue)
                              throws OpenDataException
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:
IllegalArgumentException - when one of the above constraints is not satisfied
OpenDataException
Method Detail

getDefaultValue

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

Specified by:
getDefaultValue in interface OpenMBeanParameterInfo
Returns:
the default value

getLegalValues

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

Specified by:
getLegalValues in interface OpenMBeanParameterInfo
Returns:
the legal value

getMinValue

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

Specified by:
getMinValue in interface OpenMBeanParameterInfo
Returns:
the minimum value

getMaxValue

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

Specified by:
getMaxValue in interface OpenMBeanParameterInfo
Returns:
the maximum value

getOpenType

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

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

hasDefaultValue

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

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

hasLegalValues

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

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

hasMinValue

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

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

hasMaxValue

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

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

isValue

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

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

equals

public boolean equals(Object obj)
Description copied from interface: OpenMBeanParameterInfo
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
Overrides:
equals in class MBeanParameterInfo

hashCode

public int hashCode()
Description copied from interface: OpenMBeanParameterInfo
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
Overrides:
hashCode in class MBeanParameterInfo

toString

public String toString()
Description copied from interface: OpenMBeanParameterInfo
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
Overrides:
toString in class MBeanParameterInfo
Returns:
a human readable string


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.