Java EE 5 SDK

com.sun.appserv.management.util.jmx
Class OpenMBeanUtil

java.lang.Object
  extended by com.sun.appserv.management.util.jmx.OpenMBeanUtil

public final class OpenMBeanUtil
extends Object

Utilities dealing with OpenMBeans


Method Summary
static Map<String,Serializable> compositeDataToMap(CompositeData data)
          Convert a CompositeData to a Map.
static Map<String,Serializable> convertTypes(Map<String,Serializable> orig)
          Convert certain types and return a new Map: Collection converts to an array Nulls are not eliminated; use MapUtil.newMapNoNullValues(java.util.Map) to do that before or after.
static OpenType getOpenType(Object o)
          Get the OpenType of an Object, which must conform to OpenType requirements.
static SimpleType getSimpleType(Class c)
          Get the SimpleType for a class which can be so-represented.
static OpenType getStackTraceElementOpenType()
          Get a CompositeType describing a CompositeData which has no elements.
static OpenType getThrowableOpenType(Throwable t)
          Get a CompositeType describing a CompositeData which has no elements.
static CompositeData mapToCompositeData(String typeName, String description, Map<String,Object> map)
          Create a CompositeData from a Map.
static CompositeType mapToCompositeType(String typeName, String description, Map<String,?> map, CompositeTypeFromNameCallback callback)
          Create a CompositeType from a Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSimpleType

public static SimpleType getSimpleType(Class c)
Get the SimpleType for a class which can be so-represented.


getOpenType

public static OpenType getOpenType(Object o)
                            throws InvalidOpenTypeException,
                                   OpenDataException
Get the OpenType of an Object, which must conform to OpenType requirements.

Throws:
InvalidOpenTypeException
OpenDataException

convertTypes

public static Map<String,Serializable> convertTypes(Map<String,Serializable> orig)
Convert certain types and return a new Map: Nulls are not eliminated; use MapUtil.newMapNoNullValues(java.util.Map) to do that before or after.


mapToCompositeType

public static CompositeType mapToCompositeType(String typeName,
                                               String description,
                                               Map<String,?> map,
                                               CompositeTypeFromNameCallback callback)
                                        throws OpenDataException
Create a CompositeType from a Map. Each key in the map must be a String, and each value must be a type consistent with OpenTypes.

Parameters:
typeName - the arbitrary name of the OpenType to be used
description - the arbitrary description of the OpenType to be used
map - a Map keyed by String, whose values may not be null
Throws:
OpenDataException

mapToCompositeData

public static CompositeData mapToCompositeData(String typeName,
                                               String description,
                                               Map<String,Object> map)
                                        throws OpenDataException
Create a CompositeData from a Map. Each key in the map must be a String, and each value must be a type consistent with OpenTypes.

Parameters:
typeName - the arbitrary name of the OpenType to be used
description - the arbitrary description of the OpenType to be used
map - a Map keyed by String, whose values may not be null
Throws:
OpenDataException

compositeDataToMap

public static Map<String,Serializable> compositeDataToMap(CompositeData data)
Convert a CompositeData to a Map.


getStackTraceElementOpenType

public static OpenType getStackTraceElementOpenType()
                                             throws OpenDataException
Get a CompositeType describing a CompositeData which has no elements.

Throws:
OpenDataException

getThrowableOpenType

public static OpenType getThrowableOpenType(Throwable t)
                                     throws OpenDataException
Get a CompositeType describing a CompositeData which has no elements.

Throws:
OpenDataException

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.