| javax.management.Descriptor
All known Subclasses: javax.management.modelmbean.DescriptorSupport,
Descriptor | public interface Descriptor extends Cloneable,Serializable(Code) | | A set of name-value pairs that allow ModelMBean metadata to have additional information attached to.
Descriptor is cloneable since represent a snapshot of what the client passed in to the ModelMBean.
This ensures that if the client nulls out some value, the descriptor is still valid, since it has been cloned
prior the client modification. The client can always re-set the descriptor on the model mbean.
version: $Revision: 1.6 $ |
Method Summary | |
public Object | clone() | public String[] | getFieldNames() Returns the names of all existing fields. | public Object | getFieldValue(String fieldName) Returns the value of a given field name.
Parameters: fieldName - The field name Object The value for the given field name. | public Object[] | getFieldValues(String[] fieldNames) Return the values of the specified fields, in order. | public String[] | getFields() Returns the names and values of all existing fields. | public boolean | isValid() Returns true when the values for the fields of this Descriptor are valid values, false otherwise. | public void | removeField(String fieldName) Removes the named field. | public void | setField(String fieldName, Object fieldValue) Sets a value for the given field name. | public void | setFields(String[] fieldNames, Object[] fieldValues) Sets the given fieldValues for the given fieldNames. |
getFieldNames | public String[] getFieldNames()(Code) | | Returns the names of all existing fields. If no fields are present, an empty array is returned.
|
getFieldValues | public Object[] getFieldValues(String[] fieldNames)(Code) | | Return the values of the specified fields, in order.
Parameters: fieldNames - The names of the fields Object[] The values of the fields |
getFields | public String[] getFields()(Code) | | Returns the names and values of all existing fields.
String[] The String array in the format fieldName=fieldValue.An empty descriptor will result in an empty array returned. |
removeField | public void removeField(String fieldName)(Code) | | Removes the named field. If the field is not present, does nothing.
Parameters: fieldName - The field to be removed. |
setField | public void setField(String fieldName, Object fieldValue) throws RuntimeOperationsException(Code) | | Sets a value for the given field name. The field value will be checked
before being set. This will either add a new field or update it if it
already exists.
Parameters: fieldName - The name of the field Parameters: fieldValue - The value for the given field name throws: RuntimeOperationsException - If values for fieldName or fieldValueare illegal or the description construction fails |
setFields | public void setFields(String[] fieldNames, Object[] fieldValues) throws RuntimeOperationsException(Code) | | Sets the given fieldValues for the given fieldNames.
The size of both given array should match.
Parameters: fieldNames - The names of the fields. Parameters: fieldValues - The values of the fields. throws: RuntimeOperationsException - if fieldNames or fieldValues contains illegal values. |
|
|