Class MbeansDescriptorsIntrospectionSource
java.lang.Object
org.apache.commons.modeler.modules.ModelerSource
org.apache.commons.modeler.modules.MbeansDescriptorsIntrospectionSource
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) String
private static org.apache.commons.logging.Log
(package private) List
private static ObjectName[]
(package private) Registry
(package private) Object
(package private) static Hashtable
private static String[]
private static Class[]
(package private) String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateManagedBean
(Registry registry, String domain, Class realClass, String type) XXX Find if the 'className' is the name of the MBean or the real class ( I suppose first ) XXX Read (optional) descriptions from a .properties, generated from source XXX Deal with constructorsvoid
execute()
private void
initMethods
(Class realClass, Method[] methods, Hashtable attMap, Hashtable getAttMap, Hashtable setAttMap, Hashtable invokeAttMap) Process the methods and extract 'attributes', methods, etcprotected boolean
isBeanCompatible
(Class javaType) Check if this class conforms to JavaBeans specifications.loadDescriptors
(Registry registry, String location, String type, Object source) Load data, returns a list of items.void
setLocation
(String loc) void
setRegistry
(Registry reg) void
void
Used if a single component is loadedprivate boolean
supportedType
(Class ret) Check if this class is one of the supported types.private static String
unCapitalize
(String name) Converts the first character of the given String into lower-case.Methods inherited from class org.apache.commons.modeler.modules.ModelerSource
getInputStream, store, updateField
-
Field Details
-
Constructor Details
-
MbeansDescriptorsIntrospectionSource
public MbeansDescriptorsIntrospectionSource()
-
-
Method Details
-
setRegistry
-
setLocation
-
setType
Used if a single component is loaded- Parameters:
type
-
-
setSource
-
loadDescriptors
public List loadDescriptors(Registry registry, String location, String type, Object source) throws Exception Description copied from class:ModelerSource
Load data, returns a list of items.- Overrides:
loadDescriptors
in classModelerSource
- Parameters:
registry
-location
-type
-source
- Introspected object or some other source- Throws:
Exception
-
execute
- Throws:
Exception
-
supportedType
Check if this class is one of the supported types. If the class is supported, returns true. Otherwise, returns false.- Parameters:
ret
- The class to check- Returns:
- boolean True if class is supported
-
isBeanCompatible
Check if this class conforms to JavaBeans specifications. If the class is conformant, returns true.- Parameters:
javaType
- The class to check- Returns:
- boolean True if the class is compatible.
-
initMethods
private void initMethods(Class realClass, Method[] methods, Hashtable attMap, Hashtable getAttMap, Hashtable setAttMap, Hashtable invokeAttMap) Process the methods and extract 'attributes', methods, etc- Parameters:
realClass
- The class to processmethods
- The methods to processattMap
- The attribute map (complete)getAttMap
- The readable attributess mapsetAttMap
- The settable attributes mapinvokeAttMap
- The invokable attributes map
-
createManagedBean
public ManagedBean createManagedBean(Registry registry, String domain, Class realClass, String type) XXX Find if the 'className' is the name of the MBean or the real class ( I suppose first ) XXX Read (optional) descriptions from a .properties, generated from source XXX Deal with constructors- Parameters:
registry
- The Bean registry (not used)domain
- The bean domain (not used)realClass
- The class to analyzetype
- The bean type- Returns:
- ManagedBean The create MBean
-
unCapitalize
Converts the first character of the given String into lower-case.- Parameters:
name
- The string to convert- Returns:
- String
-