|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.plugin.pc.ClassLoaderManager
public class ClassLoaderManager
Manages the classloaders created and used by the master plugin container and all plugins.
| Constructor Summary | |
|---|---|
ClassLoaderManager(Map<URL,? extends ServerPluginDescriptorType> plugins,
ClassLoader rootClassLoader,
File tmpDir)
Creates the object that will manage all classloaders for the plugins deployed in the server. |
|
| Method Summary | |
|---|---|
int |
getNumberOfServerPluginClassLoaders()
Returns the total number of plugin classloaders that have been created and managed. |
ClassLoader |
getRootClassLoader()
Returns the classloader that should be the ancestor (i.e. |
Map<org.rhq.core.domain.plugin.PluginKey,ClassLoader> |
getServerPluginClassLoaders()
Returns a shallow copy of the plugin classloaders keyed on plugin key. |
void |
loadPlugin(URL pluginUrl,
ServerPluginDescriptorType descriptor)
Hot-deploys a plugin into this classloader manager. |
ClassLoader |
obtainServerPluginClassLoader(org.rhq.core.domain.plugin.PluginKey pluginKey)
Returns a plugin classloader (creating it if necessary). |
void |
shutdown()
Cleans up this object and all classloaders it has created. |
String |
toString()
|
void |
unloadPlugin(org.rhq.core.domain.plugin.PluginKey pluginKey)
Unloads the plugin identified with the current key from this classloader manager and destroys that plugin's classloader, if one existed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClassLoaderManager(Map<URL,? extends ServerPluginDescriptorType> plugins,
ClassLoader rootClassLoader,
File tmpDir)
plugins - maps a plugin URL to that plugin's descriptorrootClassLoader - the classloader at the top of the classloader hierarchytmpDir - where the classloaders can write out the jars that are embedded in the plugin jars| Method Detail |
|---|
public void shutdown()
public void loadPlugin(URL pluginUrl,
ServerPluginDescriptorType descriptor)
pluginUrl - location of the plugin jar filedescriptor - the plugin descriptorpublic void unloadPlugin(org.rhq.core.domain.plugin.PluginKey pluginKey)
pluginKey - identifies the plugin to be unloadedpublic String toString()
toString in class Objectpublic ClassLoader getRootClassLoader()
public ClassLoader obtainServerPluginClassLoader(org.rhq.core.domain.plugin.PluginKey pluginKey)
throws Exception
pluginKey - the plugin whose classloader is to be created
Exceptionpublic int getNumberOfServerPluginClassLoaders()
public Map<org.rhq.core.domain.plugin.PluginKey,ClassLoader> getServerPluginClassLoaders()
#obtainServerPluginClassLoader(String).
null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||