class JmxBuilderTools
extends Object
This is a utility class used as a helper for JmxBuilder.
| Type | Name and description |
|---|---|
static String |
ATTRIB_KEY_DEFAULTDescriptor key for an attribute default value. |
static String |
ATTRIB_KEY_DESCShort descriptor key for an attribute description. |
static String |
ATTRIB_KEY_DESCRIPTIONDescriptor key for an attribute description. |
static String |
ATTRIB_KEY_TYPEDescriptor key for an attribute type. |
static String |
DEFAULT_DOMAINDefault domain used for generated JMX object names. |
static String |
DEFAULT_NAME_TYPEDefault type used for generated JMX object names. |
static String |
DESC_KEYDescriptor key that stores a nested descriptor map. |
static String |
DESC_KEY_DISPLAY_NAMEDescriptor key for a display name. |
static String |
DESC_KEY_EVENT_MESSAGEDescriptor key for an event message. |
static String |
DESC_KEY_EVENT_NAMEDescriptor key for an event name. |
static String |
DESC_KEY_EVENT_SOURCEDescriptor key for an event source. |
static String |
DESC_KEY_EVENT_TYPEDescriptor key for an event type. |
static String |
DESC_KEY_GETMETHODDescriptor key for a getter method name. |
static String |
DESC_KEY_JMX_NAMEDescriptor key for an ObjectName. |
static String |
DESC_KEY_MBEAN_ATTRIBSDescriptor key for attribute metadata. |
static String |
DESC_KEY_MBEAN_CTORSDescriptor key for constructor metadata. |
static String |
DESC_KEY_MBEAN_NOTESDescriptor key for notification metadata. |
static String |
DESC_KEY_MBEAN_OPSDescriptor key for operation metadata. |
static String |
DESC_KEY_MBEAN_RESOURCEDescriptor key for the managed resource reference. |
static String |
DESC_KEY_MBEAN_RESOURCE_TYPEDescriptor value identifying an object reference resource. |
static String |
DESC_KEY_NAMEDescriptor key for a logical name. |
static String |
DESC_KEY_READABLEDescriptor key for readability. |
static String |
DESC_KEY_ROLEDescriptor key for a member role. |
static String |
DESC_KEY_SETMETHODDescriptor key for a setter method name. |
static String |
DESC_KEY_SIGNATUREDescriptor key for a signature list. |
static String |
DESC_KEY_TYPEDescriptor key for the descriptor type. |
static String |
DESC_KEY_WRITABLEDescriptor key for writability. |
static String |
DESC_VAL_TYPE_ATTRIBDescriptor value for attribute metadata. |
static String |
DESC_VAL_TYPE_CTORDescriptor value for constructor metadata. |
static String |
DESC_VAL_TYPE_GETTERDescriptor value for getter metadata. |
static String |
DESC_VAL_TYPE_MBEANDescriptor value for MBean metadata. |
static String |
DESC_VAL_TYPE_NOTIFICATIONDescriptor value for notification metadata. |
static String |
DESC_VAL_TYPE_OPDescriptor value for operation metadata. |
static String |
DESC_VAL_TYPE_SETTERDescriptor value for setter metadata. |
static String |
EVENT_KEY_CALLBACKEvent packet key for a callback closure. |
static String |
EVENT_KEY_CALLBACK_RESULTEvent packet key for a callback result. |
static String |
EVENT_KEY_CONTEXTSEvent packet key for callback contexts. |
static String |
EVENT_KEY_ISATTRIBEvent packet key indicating attribute handling. |
static String |
EVENT_KEY_MESSAGEEvent packet key for an event message. |
static String |
EVENT_KEY_METHODEvent packet key for a target method name. |
static String |
EVENT_KEY_METHOD_RESULTEvent packet key for a target method result. |
static String |
EVENT_KEY_NAMEEvent packet key for an event name. |
static String |
EVENT_KEY_NODE_TYPEEvent packet key for the originating node type. |
static String |
EVENT_KEY_TARGETSEvent packet key for registered listeners. |
static String |
EVENT_KEY_TYPEEvent packet key for an event type. |
static String |
EVENT_VAL_NODETYPE_BROADCASTEREvent node type value for broadcasters. |
static String |
EVENT_VAL_NODETYPE_LISTENEREvent node type value for listeners. |
static String |
JMX_KEYEmbedded JMX descriptor property name. |
static String |
NODE_NAME_ATTRIBSShort builder node name for attributes. |
static String |
NODE_NAME_ATTRIBUTESCanonical builder node name for attributes. |
static String |
NODE_NAME_CONSTRUCTORSCanonical builder node name for constructors. |
static String |
NODE_NAME_CTORSShort builder node name for constructors. |
static String |
NODE_NAME_OPERATIONSCanonical builder node name for operations. |
static String |
NODE_NAME_OPSShort builder node name for operations. |
static Map |
PRIMITIVE_TYPESMaps primitive type names to their JVM primitive classes. |
static Map |
TYPE_MAPMaps supported type aliases to concrete Java classes. |
| Constructor and description |
|---|
JmxBuilderTools() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static String |
capitalize(String value)Capitalize the string passed. |
|
static ObjectName |
getDefaultObjectName(Object 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(Object 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)Registers an MBean described by the supplied metadata map. |
|
static String |
uncapitalize(String value)Uncapitalizes a string. |
Descriptor key for an attribute default value.
Short descriptor key for an attribute description.
Descriptor key for an attribute description.
Descriptor key for an attribute type.
Default domain used for generated JMX object names.
Default type used for generated JMX object names.
Descriptor key that stores a nested descriptor map.
Descriptor key for a display name.
Descriptor key for an event message.
Descriptor key for an event name.
Descriptor key for an event source.
Descriptor key for an event type.
Descriptor key for a getter method name.
Descriptor key for an ObjectName.
Descriptor key for attribute metadata.
Descriptor key for constructor metadata.
Descriptor key for notification metadata.
Descriptor key for operation metadata.
Descriptor key for the managed resource reference.
Descriptor value identifying an object reference resource.
Descriptor key for a logical name.
Descriptor key for readability.
Descriptor key for a member role.
Descriptor key for a setter method name.
Descriptor key for a signature list.
Descriptor key for the descriptor type.
Descriptor key for writability.
Descriptor value for attribute metadata.
Descriptor value for constructor metadata.
Descriptor value for getter metadata.
Descriptor value for MBean metadata.
Descriptor value for notification metadata.
Descriptor value for operation metadata.
Descriptor value for setter metadata.
Event packet key for a callback closure.
Event packet key for a callback result.
Event packet key for callback contexts.
Event packet key indicating attribute handling.
Event packet key for an event message.
Event packet key for a target method name.
Event packet key for a target method result.
Event packet key for an event name.
Event packet key for the originating node type.
Event packet key for registered listeners.
Event packet key for an event type.
Event node type value for broadcasters.
Event node type value for listeners.
Embedded JMX descriptor property name.
Short builder node name for attributes.
Canonical builder node name for attributes.
Canonical builder node name for constructors.
Short builder node name for constructors.
Canonical builder node name for operations.
Short builder node name for operations.
Maps primitive type names to their JVM primitive classes.
Maps supported type aliases to concrete Java classes.
Capitalize the string passed.
value - - string to capitalize.Builds a default ObjectName() instance for a given backing POJO/POGO
obj - - the backing pojo/pogoReturns an MBeanServerConnection instance. It searches for declared MBeanServers from the MBeanServerFactory. If none is found, the default Platform MBeanServer is returned.
Returns the proper type's class name when a short version is provided (i.e. String returns java.lang.String)
type - - the type name to normalizeReturns method signature (as Class[]) given the meta map that describes the method.
params - - the map with parameter info.Tests whether the provided class implements MBean. It uses the following runes
if(
DynamicMBean.class.isAssignable(cls) ||
cls.getName().endsWith("MBean") ||
cls.getName().endsWith("MXBean")
) then class is MBean
cls - - class to testRegisters an MBean described by the supplied metadata map.
regPolicy - the registration policy to applymetaMap - the normalized bean metadatanull when registration is ignoredCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.