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

CompositeDataSupport (JBoss/JMX API) - JBoss 3.2.7 jmx API Documentation 英文版文档


javax.management.openmbean
Class CompositeDataSupport

java.lang.Object
  extended byjavax.management.openmbean.CompositeDataSupport
All Implemented Interfaces:
CompositeData, Serializable

public class CompositeDataSupport
extends Object
implements CompositeData, Serializable

An implementation of CompositeData.

Version:
$Revision: 1.1.2.3 $
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
CompositeDataSupport(CompositeType compositeType, Map items)
          Construct Composite Data
CompositeDataSupport(CompositeType compositeType, String[] itemNames, Object[] itemValues)
          Construct Composite Data
 
Method Summary
 boolean containsKey(String key)
          Tests whether a key is part of this composite data
 boolean containsValue(Object value)
          Tests whether a item exists with the passed value
 boolean equals(Object obj)
          Tests whether two composite data objects are equal
 Object get(String key)
          Retrieve the value for the item with the passed key
 Object[] getAll(String[] keys)
          Retrieve the arrray of values for the item with the passed keys
 CompositeType getCompositeType()
          Retrieve the composite type for this composite data
 int hashCode()
          Generates a hashcode for the implementation.
 String toString()
          A string representation of the open mbean operation info.
 void validateKey(String key)
          Validates the key against the composite type
 Collection values()
          The values of this composite data
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeDataSupport

public CompositeDataSupport(CompositeType compositeType,
                            String[] itemNames,
                            Object[] itemValues)
                     throws OpenDataException
Construct Composite Data

Parameters:
compositeType - the composite type of the data
itemNames - the names of the values
itemValues - the values
Throws:
IllegalArgumentException - for a null or empty argument
OpenDataException - when the items do not match the CompositeType

CompositeDataSupport

public CompositeDataSupport(CompositeType compositeType,
                            Map items)
                     throws OpenDataException
Construct Composite Data

Parameters:
compositeType - the composite type of the data
items - map of strings to values
Throws:
IllegalArgumentException - for a null or empty argument
OpenDataException - when the items do not match the CompositeType
ArrayStoreException - when a key to the map is not a String
Method Detail

getCompositeType

public CompositeType getCompositeType()
Description copied from interface: CompositeData
Retrieve the composite type for this composite data

Specified by:
getCompositeType in interface CompositeData
Returns:
the composite type

get

public Object get(String key)
Description copied from interface: CompositeData
Retrieve the value for the item with the passed key

Specified by:
get in interface CompositeData
Returns:
the value

getAll

public Object[] getAll(String[] keys)
Description copied from interface: CompositeData
Retrieve the arrray of values for the item with the passed keys

Specified by:
getAll in interface CompositeData
Returns:
the array of values

containsKey

public boolean containsKey(String key)
Description copied from interface: CompositeData
Tests whether a key is part of this composite data

Specified by:
containsKey in interface CompositeData
Returns:
true when the key exists, false otherwise

containsValue

public boolean containsValue(Object value)
Description copied from interface: CompositeData
Tests whether a item exists with the passed value

Specified by:
containsValue in interface CompositeData
Returns:
true when the value exists, false otherwise

values

public Collection values()
Description copied from interface: CompositeData
The values of this composite data

An iterator over the returned collection returns result in ascending lexicographic order

Specified by:
values in interface CompositeData
Returns:
an unmodifiable Collection of the values of this CompositeType.

equals

public boolean equals(Object obj)
Description copied from interface: CompositeData
Tests whether two composite data objects are equal

The object is non-null
The object implements this interface
The composite types are equal
The values are equal

Specified by:
equals in interface CompositeData

hashCode

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

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

Specified by:
hashCode in interface CompositeData

toString

public String toString()
Description copied from interface: CompositeData
A string representation of the open mbean operation info.

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

Specified by:
toString in interface CompositeData

validateKey

public void validateKey(String key)
                 throws InvalidKeyException
Validates the key against the composite type

Parameters:
key - the key to check
Throws:
IllegalArgumentException - for a null or empty key
InvalidKeyException - if the key not a valid item name for the composite type


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