Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.0
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## groovy.jmx.builder
Class JmxBuilderTools

    java.lang.Object
      groovy.jmx.builder.JmxBuilderTools

    class JmxBuilderTools
    extends Object

This is a utility class used as a helper for JmxBuilder.

author:
  Vladimir Vivien

Property Summary
`static String` | `ATTRIB_KEY_DEFAULT`
`static String` | `ATTRIB_KEY_DESC`
`static String` | `ATTRIB_KEY_DESCRIPTION`
`static String` | `ATTRIB_KEY_TYPE`
`static String` | `DEFAULT_DOMAIN`
`static String` | `DEFAULT_NAME_TYPE`
`static String` | `DESC_KEY`
`static String` | `DESC_KEY_DISPLAY_NAME`
`static String` | `DESC_KEY_EVENT_MESSAGE`
`static String` | `DESC_KEY_EVENT_NAME`
`static String` | `DESC_KEY_EVENT_SOURCE`
`static String` | `DESC_KEY_EVENT_TYPE`
`static String` | `DESC_KEY_GETMETHOD`
`static String` | `DESC_KEY_JMX_NAME`
`static String` | `DESC_KEY_MBEAN_ATTRIBS`
`static String` | `DESC_KEY_MBEAN_CTORS`
`static String` | `DESC_KEY_MBEAN_NOTES`
`static String` | `DESC_KEY_MBEAN_OPS`
`static String` | `DESC_KEY_MBEAN_RESOURCE`
`static String` | `DESC_KEY_MBEAN_RESOURCE_TYPE`
`static String` | `DESC_KEY_NAME`
`static String` | `DESC_KEY_READABLE`
`static String` | `DESC_KEY_ROLE`
`static String` | `DESC_KEY_SETMETHOD`
`static String` | `DESC_KEY_SIGNATURE`
`static String` | `DESC_KEY_TYPE`
`static String` | `DESC_KEY_WRITABLE`
`static String` | `DESC_VAL_TYPE_ATTRIB`
`static String` | `DESC_VAL_TYPE_CTOR`
`static String` | `DESC_VAL_TYPE_GETTER`
`static String` | `DESC_VAL_TYPE_MBEAN`
`static String` | `DESC_VAL_TYPE_NOTIFICATION`
`static String` | `DESC_VAL_TYPE_OP`
`static String` | `DESC_VAL_TYPE_SETTER`
`static String` | `EVENT_KEY_CALLBACK`
`static String` | `EVENT_KEY_CALLBACK_RESULT`
`static String` | `EVENT_KEY_CONTEXTS`
`static String` | `EVENT_KEY_ISATTRIB`
`static String` | `EVENT_KEY_MESSAGE`
`static String` | `EVENT_KEY_METHOD`
`static String` | `EVENT_KEY_METHOD_RESULT`
`static String` | `EVENT_KEY_NAME`
`static String` | `EVENT_KEY_NODE_TYPE`
`static String` | `EVENT_KEY_TARGETS`
`static String` | `EVENT_KEY_TYPE`
`static String` | `EVENT_VAL_NODETYPE_BROADCASTER`
`static String` | `EVENT_VAL_NODETYPE_LISTENER`
`static String` | `JMX_KEY`
`static String` | `NODE_NAME_ATTRIBS`
`static String` | `NODE_NAME_ATTRIBUTES`
`static String` | `NODE_NAME_CONSTRUCTORS`
`static String` | `NODE_NAME_CTORS`
`static String` | `NODE_NAME_OPERATIONS`
`static String` | `NODE_NAME_OPS`
`static Map` | `PRIMITIVE_TYPES`
`static Map` | `TYPE_MAP`

Constructor Summary
`JmxBuilderTools()`

Method Summary
`static String` | `capitalize(String value)` Capitalize the string passed.
`static ObjectName` | `getDefaultObjectName(def obj)` Builds a default ObjectName() instance for a given backing POJO/POGO
`static MBeanServerConnection` | `getMBeanServer()` Returns an MBeanServerConnection instance.
`static String` | `getNormalizedType(String type)` Returns the proper type's class name when a short version is provided (i.e.
`static Class[]` | `getSignatureFromParamInfo(def params)` Returns method signature (as Class[]) given the meta map that describes the method.
`static boolean` | `isClassMBean(Class cls)` Tests whether the provided class implements MBean.
`static GroovyMBean` | `registerMBeanFromMap(String regPolicy, Map metaMap)`
`static String` | `uncapitalize(String value)` Uncapitalizes a string.

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Property Detail

### ATTRIB_KEY_DEFAULT

    static String ATTRIB_KEY_DEFAULT

### ATTRIB_KEY_DESC

    static String ATTRIB_KEY_DESC

### ATTRIB_KEY_DESCRIPTION

    static String ATTRIB_KEY_DESCRIPTION

### ATTRIB_KEY_TYPE

    static String ATTRIB_KEY_TYPE

### DEFAULT_DOMAIN

    static String DEFAULT_DOMAIN

### DEFAULT_NAME_TYPE

    static String DEFAULT_NAME_TYPE

### DESC_KEY

    static String DESC_KEY

### DESC_KEY_DISPLAY_NAME

    static String DESC_KEY_DISPLAY_NAME

### DESC_KEY_EVENT_MESSAGE

    static String DESC_KEY_EVENT_MESSAGE

### DESC_KEY_EVENT_NAME

    static String DESC_KEY_EVENT_NAME

### DESC_KEY_EVENT_SOURCE

    static String DESC_KEY_EVENT_SOURCE

### DESC_KEY_EVENT_TYPE

    static String DESC_KEY_EVENT_TYPE

### DESC_KEY_GETMETHOD

    static String DESC_KEY_GETMETHOD

### DESC_KEY_JMX_NAME

    static String DESC_KEY_JMX_NAME

### DESC_KEY_MBEAN_ATTRIBS

    static String DESC_KEY_MBEAN_ATTRIBS

### DESC_KEY_MBEAN_CTORS

    static String DESC_KEY_MBEAN_CTORS

### DESC_KEY_MBEAN_NOTES

    static String DESC_KEY_MBEAN_NOTES

### DESC_KEY_MBEAN_OPS

    static String DESC_KEY_MBEAN_OPS

### DESC_KEY_MBEAN_RESOURCE

    static String DESC_KEY_MBEAN_RESOURCE

### DESC_KEY_MBEAN_RESOURCE_TYPE

    static String DESC_KEY_MBEAN_RESOURCE_TYPE

### DESC_KEY_NAME

    static String DESC_KEY_NAME

### DESC_KEY_READABLE

    static String DESC_KEY_READABLE

### DESC_KEY_ROLE

    static String DESC_KEY_ROLE

### DESC_KEY_SETMETHOD

    static String DESC_KEY_SETMETHOD

### DESC_KEY_SIGNATURE

    static String DESC_KEY_SIGNATURE

### DESC_KEY_TYPE

    static String DESC_KEY_TYPE

### DESC_KEY_WRITABLE

    static String DESC_KEY_WRITABLE

### DESC_VAL_TYPE_ATTRIB

    static String DESC_VAL_TYPE_ATTRIB

### DESC_VAL_TYPE_CTOR

    static String DESC_VAL_TYPE_CTOR

### DESC_VAL_TYPE_GETTER

    static String DESC_VAL_TYPE_GETTER

### DESC_VAL_TYPE_MBEAN

    static String DESC_VAL_TYPE_MBEAN

### DESC_VAL_TYPE_NOTIFICATION

    static String DESC_VAL_TYPE_NOTIFICATION

### DESC_VAL_TYPE_OP

    static String DESC_VAL_TYPE_OP

### DESC_VAL_TYPE_SETTER

    static String DESC_VAL_TYPE_SETTER

### EVENT_KEY_CALLBACK

    static String EVENT_KEY_CALLBACK

### EVENT_KEY_CALLBACK_RESULT

    static String EVENT_KEY_CALLBACK_RESULT

### EVENT_KEY_CONTEXTS

    static String EVENT_KEY_CONTEXTS

### EVENT_KEY_ISATTRIB

    static String EVENT_KEY_ISATTRIB

### EVENT_KEY_MESSAGE

    static String EVENT_KEY_MESSAGE

### EVENT_KEY_METHOD

    static String EVENT_KEY_METHOD

### EVENT_KEY_METHOD_RESULT

    static String EVENT_KEY_METHOD_RESULT

### EVENT_KEY_NAME

    static String EVENT_KEY_NAME

### EVENT_KEY_NODE_TYPE

    static String EVENT_KEY_NODE_TYPE

### EVENT_KEY_TARGETS

    static String EVENT_KEY_TARGETS

### EVENT_KEY_TYPE

    static String EVENT_KEY_TYPE

### EVENT_VAL_NODETYPE_BROADCASTER

    static String EVENT_VAL_NODETYPE_BROADCASTER

### EVENT_VAL_NODETYPE_LISTENER

    static String EVENT_VAL_NODETYPE_LISTENER

### JMX_KEY

    static String JMX_KEY

### NODE_NAME_ATTRIBS

    static String NODE_NAME_ATTRIBS

### NODE_NAME_ATTRIBUTES

    static String NODE_NAME_ATTRIBUTES

### NODE_NAME_CONSTRUCTORS

    static String NODE_NAME_CONSTRUCTORS

### NODE_NAME_CTORS

    static String NODE_NAME_CTORS

### NODE_NAME_OPERATIONS

    static String NODE_NAME_OPERATIONS

### NODE_NAME_OPS

    static String NODE_NAME_OPS

### PRIMITIVE_TYPES

    static Map PRIMITIVE_TYPES

### TYPE_MAP

    static Map TYPE_MAP

Constructor Detail

### JmxBuilderTools

    JmxBuilderTools()

Method Detail

### capitalize

    public static String capitalize(String value)

  Capitalize the string passed.
  param:
    value - string to capitalize.
  return:
    - a capitalized string.

### getDefaultObjectName

    public static ObjectName getDefaultObjectName(def obj)

  Builds a default ObjectName() instance for a given backing POJO/POGO
  param:
    obj - the backing pojo/pogo
  return:
    the generated ObjectName() instance.

### getMBeanServer

    public static MBeanServerConnection getMBeanServer()

  Returns an MBeanServerConnection instance. It searches for declared MBeanServers from the MBeanServerFactory. If none is found, the default Platform MBeanServer is returned.

### getNormalizedType

    public static String getNormalizedType(String type)

  Returns the proper type's class name when a short version is provided (i.e. String returns java.lang.String)
  param:
    type - the type name to normalize
  return:
    the normalized type name.

### getSignatureFromParamInfo

    public static Class[] getSignatureFromParamInfo(def params)

  Returns method signature (as Class[]) given the meta map that describes the method.
  param:
    params - the map with parameter info.
  return:
    Class[] that represent the method signature.

### isClassMBean

    public static boolean isClassMBean(Class cls)

  Tests whether the provided class implements MBean. It uses the following runes

       if(
           DyanamicMBean.class.isAssignable(cls) ||
           cls.getName().endsWith("MBean") ||
           cls.getName().endsWith("MXBean")
       ) then class is MBean

  param:
    cls - class to test
  return:
    true = if class implements DyanmicMBean or interface name that ends in MBean or MXBean.

### registerMBeanFromMap

    public static GroovyMBean registerMBeanFromMap(String regPolicy, Map metaMap)

### uncapitalize

    public static String uncapitalize(String value)

  Uncapitalizes a string.
  param:
    value - string to uncap.
  return:
    uncap'ed string.

Copyright © 2003-2009 The Codehaus. All rights reserved.