|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.modeler.Registry
Registry for MBean descriptor information. This class implements the Singleton design pattern.
WARNING - It is expected that this registry will be initially populated at startup time, and then provide read-only access in a multithreaded environment. Therefore, no instance operations are synchronized.
Field Summary | |
private java.util.HashMap |
beans
The set of ManagedBean instances for the beans this registry knows about, keyed by name. |
private static org.apache.commons.logging.Log |
log
The Log instance to which we will write our log messages. |
private static Registry |
registry
The registry instance created by our factory method the first time it is called. |
private static javax.management.MBeanServer |
server
The MBeanServer instance that we will use to register
management beans. |
Constructor Summary | |
private |
Registry()
Private constructor to require use of the factory create method. |
Method Summary | |
void |
addManagedBean(ManagedBean bean)
Add a new bean to the set of beans known to this registry. |
ManagedBean |
findManagedBean(java.lang.String name)
Find and return the managed bean definition for the specified bean name, if any; otherwise return null . |
java.lang.String[] |
findManagedBeans()
Return the set of bean names for all managed beans known to this registry. |
java.lang.String[] |
findManagedBeans(java.lang.String group)
Return the set of bean names for all managed beans known to this registry that belong to the specified group. |
static Registry |
getRegistry()
Factory method to create (if necessary) and return our Registry instance. |
static javax.management.MBeanServer |
getServer()
Factory method to create (if necessary) and return our MBeanServer instance. |
static void |
loadRegistry(java.io.InputStream stream)
Load the registry from the XML input found in the specified input stream. |
void |
removeManagedBean(ManagedBean bean)
Remove an existing bean from the set of beans known to this registry. |
static void |
setServer(javax.management.MBeanServer mbeanServer)
Set the MBeanServer to be utilized for our
registered management beans. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.HashMap beans
private static org.apache.commons.logging.Log log
private static Registry registry
private static javax.management.MBeanServer server
MBeanServer
instance that we will use to register
management beans.Constructor Detail |
private Registry()
Method Detail |
public void addManagedBean(ManagedBean bean)
bean
- The managed bean to be addedpublic ManagedBean findManagedBean(java.lang.String name)
null
.name
- Name of the managed bean to be returnedpublic java.lang.String[] findManagedBeans()
public java.lang.String[] findManagedBeans(java.lang.String group)
group
- Name of the group of interest, or null
to select beans that do not belong to a grouppublic void removeManagedBean(ManagedBean bean)
bean
- The managed bean to be removedpublic static Registry getRegistry()
Registry
instance.public static javax.management.MBeanServer getServer()
MBeanServer
instance.public static void loadRegistry(java.io.InputStream stream) throws java.lang.Exception
stream
- InputStream containing the registry configuration
informationjava.lang.Exception
- if any parsing or processing error occurspublic static void setServer(javax.management.MBeanServer mbeanServer)
MBeanServer
to be utilized for our
registered management beans.mbeanServer
- The new MBeanServer
instance
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |