public class NoDescriptorRegistry extends Registry
| Constructor and Description |
|---|
NoDescriptorRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addManagedBean(ManagedBean bean)
Add a new bean metadata to the set of beans known to this registry.
|
ManagedBean |
findManagedBean(Object bean,
Class<?> beanClass,
String type)
Find or load metadata.
|
ManagedBean |
findManagedBean(String name)
Find and return the managed bean definition for the specified bean name,
if any; otherwise return
null. |
int |
getId(String domain,
String name)
Return an int ID for faster access.
|
MBeanServer |
getMBeanServer()
Factory method to create (if necessary) and return our
MBeanServer instance. |
MBeanOperationInfo |
getMethodInfo(ObjectName oname,
String opName)
Find the operation info for a method
|
String |
getType(ObjectName oname,
String attName)
Get the type of an attribute of the object, from the metadata.
|
void |
invoke(List<ObjectName> mbeans,
String operation,
boolean failFirst)
Invoke a operation on a list of mbeans.
|
List<ObjectName> |
load(String sourceType,
Object source,
String param)
Experimental.
|
void |
loadDescriptors(String packageName,
ClassLoader classLoader)
Lookup the component descriptor in the package and in the parent
packages.
|
void |
registerComponent(Object bean,
ObjectName oname,
String type)
Register a component
|
void |
registerComponent(Object bean,
String oname,
String type)
Register a bean by creating a modeler mbean and adding it to the
MBeanServer.
|
void |
unregisterComponent(ObjectName oname)
Unregister a component.
|
void |
unregisterComponent(String oname)
Unregister a component.
|
convertValue, disableRegistry, getMethodInfo, getRegistry, postDeregister, postRegister, preDeregister, preRegister, stoppublic void registerComponent(Object bean, String oname, String type) throws Exception
RegistryregisterComponent in interface RegistryMBeanregisterComponent in class Registrybean - Object to be registeredoname - Name used for registrationtype - The type of the mbean, as declared in mbeans-descriptors. If
null, the name of the class will be used. This can be used as
a hint or by subclasses.Exception - if a registration error occurredpublic void unregisterComponent(String oname)
RegistryunregisterComponent in interface RegistryMBeanunregisterComponent in class Registryoname - Name used for unregistrationpublic void invoke(List<ObjectName> mbeans, String operation, boolean failFirst) throws Exception
Registryinvoke in interface RegistryMBeaninvoke in class Registrymbeans - list of ObjectName on which we'll invoke the operationsoperation - Name of the operation ( init, start, stop, etc)failFirst - If false, exceptions will be ignoredException - Error invoking operationpublic int getId(String domain, String name)
RegistrygetId in interface RegistryMBeangetId in class Registrydomain - Namespacename - Type of the notificationpublic void addManagedBean(ManagedBean bean)
RegistryaddManagedBean in class Registrybean - The managed bean to be addedpublic ManagedBean findManagedBean(String name)
Registrynull.findManagedBean in class Registryname - Name of the managed bean to be returned. Since 1.1, both
short names or the full name of the class can be used.public String getType(ObjectName oname, String attName)
Registrypublic MBeanOperationInfo getMethodInfo(ObjectName oname, String opName)
RegistrygetMethodInfo in class Registryoname - The bean nameopName - The operation namepublic ManagedBean findManagedBean(Object bean, Class<?> beanClass, String type) throws Exception
RegistryfindManagedBean in class Registrybean - The beanbeanClass - The bean classtype - The registry typeException - An error occurredpublic List<ObjectName> load(String sourceType, Object source, String param) throws Exception
Registrypublic void loadDescriptors(String packageName, ClassLoader classLoader)
RegistryloadDescriptors in class RegistrypackageName - The package nameclassLoader - The class loaderpublic void registerComponent(Object bean, ObjectName oname, String type) throws Exception
RegistryregisterComponent in class Registrybean - The beanoname - The object nametype - The registry typeException - Error registering componentpublic void unregisterComponent(ObjectName oname)
RegistryunregisterComponent in class Registryoname - The bean namepublic MBeanServer getMBeanServer()
RegistryMBeanServer instance.getMBeanServer in class RegistryCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.