org.apache.commons.modeler.modules
Class MbeansDescriptorsIntrospectionSource
public class MbeansDescriptorsIntrospectionSource
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
|
void | execute()
|
private void | initMethods(Class realClass, methods[] , Hashtable attMap, Hashtable getAttMap, Hashtable setAttMap, Hashtable invokeAttMap) - Process the methods and extract 'attributes', methods, etc
|
protected boolean | isBeanCompatible(Class javaType) - Check if this class conforms to JavaBeans specifications.
|
List | 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 | setSource(Object source)
|
void | setType(String type) - Used if a single component is loaded
|
private 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.
|
location
(package private) String location
log
private static Log log
mbeans
(package private) List mbeans
objNameArray
private static ObjectName[] objNameArray
registry
(package private) Registry registry
source
(package private) Object source
specialMethods
(package private) static Hashtable specialMethods
strArray
private static String[] strArray
supportedTypes
private static Class[] supportedTypes
type
(package private) String type
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
registry
- The Bean registry (not used)domain
- The bean domain (not used)realClass
- The class to analyzetype
- The bean type
- ManagedBean The create MBean
execute
public void execute()
throws Exception
initMethods
private void initMethods(Class realClass,
methods[] ,
Hashtable attMap,
Hashtable getAttMap,
Hashtable setAttMap,
Hashtable invokeAttMap)
Process the methods and extract 'attributes', methods, etc
realClass
- The class to processattMap
- The attribute map (complete)getAttMap
- The readable attributess mapsetAttMap
- The settable attributes mapinvokeAttMap
- The invokable attributes map
isBeanCompatible
protected boolean isBeanCompatible(Class javaType)
Check if this class conforms to JavaBeans specifications.
If the class is conformant, returns true.
javaType
- The class to check
- boolean True if the class is compatible.
loadDescriptors
public List loadDescriptors(Registry registry,
String location,
String type,
Object source)
throws Exception
Load data, returns a list of items.
- loadDescriptors in interface ModelerSource
registry
- location
- type
- source
- Introspected object or some other source
setLocation
public void setLocation(String loc)
setRegistry
public void setRegistry(Registry reg)
setSource
public void setSource(Object source)
setType
public void setType(String type)
Used if a single component is loaded
supportedType
private boolean supportedType(Class ret)
Check if this class is one of the supported types.
If the class is supported, returns true. Otherwise,
returns false.
- boolean True if class is supported
unCapitalize
private static String unCapitalize(String name)
Converts the first character of the given
String into lower-case.
name
- The string to convert
Copyright (c) 2001-2003 - Apache Software Foundation