javax.jmx.openmbean
Class CompositeData

java.lang.Object
  |
  +--javax.jmx.openmbean.CompositeData

public class CompositeData
extends java.lang.Object
implements java.io.Serializable

The CompositeData class defines a static Hashtable with an arbitrary number of entries which can be of any type. All the entries must have a type among the set of basic data types.Since , this set also includes CompositeData, complex hierarchies may be represented by creating composite types which contain other composite types.

See Also:
Serialized Form

Field Summary
static java.lang.String CREATED
          Static variable to specify the operation type of the CompositeData as "CREATED" row
static java.lang.String DELETED
          Static variable to specify the operation type of the CompositeData as "DELETED" row
static java.lang.String MODIFIED
          Static variable to specify the operation type of the CompositeData as "MODIFIED" row
static java.lang.String NOCHANGES
          Static variable to specify the operation type of the CompositeData as "DELETED" row
 
Constructor Summary
CompositeData(CompositeParameterInfo parameterInfo, java.lang.String[] names, java.lang.Object[] values)
          The constructor takes a CompositeParameterInfo Object, an array of strings and an array of Objects.This verifies that the actual type of each object is coherent with the type given for each name in the descriptor object.
 
Method Summary
 boolean containsDataItem(java.lang.String name)
          Checks whether a data item exists for the given name in this instance of CompositeData.
 java.lang.Object deleteDataItem(java.lang.String name)
          Deletes the data item for the given name.
 java.util.Enumeration enumerate()
          Returns an Enumeration of all the name-value pair in this CompositeData
 java.lang.Object getDataItem(java.lang.String name)
          Gets the data item for the given name.
 java.lang.String getOperationType()
          Returns the operation type of this composite data instance.
 boolean isModified(java.lang.String name)
          Return whether the attribute with the given name is modifed/unchanged value.
 void setDataItem(java.lang.String name, java.lang.Object value)
          Sets the data item for the given name with the given value.
 void setModified(java.lang.String name, boolean isModifiedFlag)
          Sets the attribute with the given name is modifed/unchanged flag.
 void setOperationType(java.lang.String operationtype)
          Sets the operation type of this composite data instance.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATED

public static final java.lang.String CREATED
Static variable to specify the operation type of the CompositeData as "CREATED" row

MODIFIED

public static final java.lang.String MODIFIED
Static variable to specify the operation type of the CompositeData as "MODIFIED" row

DELETED

public static final java.lang.String DELETED
Static variable to specify the operation type of the CompositeData as "DELETED" row

NOCHANGES

public static final java.lang.String NOCHANGES
Static variable to specify the operation type of the CompositeData as "DELETED" row
Constructor Detail

CompositeData

public CompositeData(CompositeParameterInfo parameterInfo,
                     java.lang.String[] names,
                     java.lang.Object[] values)
              throws java.lang.Exception
The constructor takes a CompositeParameterInfo Object, an array of strings and an array of Objects.This verifies that the actual type of each object is coherent with the type given for each name in the descriptor object.
Parameters:
parameterInfo - is a descriptor for the CompositeData which provides the name and description of the CompositeData object,as well as the name,description and types of all entries.
names - the name given to each data item.
values - provides the value for the data item , whose name is in the same ordinal position in the array of names.
Method Detail

getDataItem

public java.lang.Object getDataItem(java.lang.String name)
Gets the data item for the given name.
Parameters:
name - the data item which is compared to all names
Returns:
Object - the object stored for the corresponding data item.

containsDataItem

public boolean containsDataItem(java.lang.String name)
Checks whether a data item exists for the given name in this instance of CompositeData.
Parameters:
name - the name to be searched for.
Returns:
boolean True if a data item exists for the given name.

enumerate

public java.util.Enumeration enumerate()
Returns an Enumeration of all the name-value pair in this CompositeData
Returns:
Enumeration of the name-value pairs in this CompositeData.

isModified

public boolean isModified(java.lang.String name)
Return whether the attribute with the given name is modifed/unchanged value.

setModified

public void setModified(java.lang.String name,
                        boolean isModifiedFlag)
Sets the attribute with the given name is modifed/unchanged flag.

getOperationType

public java.lang.String getOperationType()
Returns the operation type of this composite data instance. Could be either "created", "modified", "nochanges", or "deleted" strings. Default value is CompositeData.NOCHANGES

setOperationType

public void setOperationType(java.lang.String operationtype)
Sets the operation type of this composite data instance. Could be either "created", "modified", "nochanges", or "deleted" strings. Default value is CompositeData.NOCHANGES

deleteDataItem

public java.lang.Object deleteDataItem(java.lang.String name)
Deletes the data item for the given name.
Parameters:
name - the data item which is to be deleted
Returns:
Object - the deleted data item value

setDataItem

public void setDataItem(java.lang.String name,
                        java.lang.Object value)
Sets the data item for the given name with the given value.
Parameters:
name - the data item which is to be set
value - the value of the data item to be set