|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
org.jvnet.hk2.osgiadapter.OSGiModulesRegistryImpl
public class OSGiModulesRegistryImpl
This is an implementation of ModulesRegistry.
It uses OSGi extender pattern to do necessary parsing of OSGi bundles.
| Field Summary |
|---|
| Fields inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl |
|---|
modules, parent, providers, repositories |
| Method Summary | |
|---|---|
protected void |
add(com.sun.enterprise.module.Module newModule)
|
void |
addModuleChangeListener(com.sun.enterprise.module.ModuleChangeListener listener,
OSGiModuleImpl module)
|
void |
bundleChanged(org.osgi.framework.BundleEvent event)
|
com.sun.enterprise.module.ModulesRegistry |
createChild()
|
void |
detachAll()
|
com.sun.enterprise.module.Module |
find(java.lang.Class clazz)
|
java.lang.ClassLoader |
getModulesClassLoader(java.lang.ClassLoader parent,
java.util.Collection<com.sun.enterprise.module.ModuleDefinition> defs)
Returns a ClassLoader capable of loading classes from a set of modules identified by their module definition |
java.lang.ClassLoader |
getModulesClassLoader(java.lang.ClassLoader parent,
java.util.Collection<com.sun.enterprise.module.ModuleDefinition> mds,
java.net.URL[] urls)
Returns a ClassLoader capable of loading classes from a set of modules identified by their module definition and also load new urls. |
org.osgi.service.packageadmin.PackageAdmin |
getPackageAdmin()
|
java.lang.ClassLoader |
getParentClassLoader()
Returns the parent class loader parenting the class loaders created by modules associated with this registry. |
protected com.sun.enterprise.module.Module |
newModule(com.sun.enterprise.module.ModuleDefinition moduleDef)
|
void |
parseInhabitants(com.sun.enterprise.module.Module module,
java.lang.String name,
com.sun.hk2.component.InhabitantsParser inhabitantsParser)
|
void |
register(com.sun.enterprise.module.ModuleLifecycleListener listener)
|
void |
remove(com.sun.enterprise.module.Module module)
|
boolean |
removeModuleChangeListener(com.sun.enterprise.module.ModuleChangeListener listener)
|
void |
setParentClassLoader(java.lang.ClassLoader parent)
Sets the classloader parenting the class loaders created by the modules associated with this registry. |
void |
shutdown()
|
void |
unregister(com.sun.enterprise.module.ModuleLifecycleListener listener)
|
| Methods inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl |
|---|
add, add, addRepository, addRepository, changed, createHabitat, createHabitat, createHabitat, createInhabitantsParser, dumpState, getModules, getModules, getModulesProvider, getProvidersClass, getProvidingModule, getRepository, getRunningServices, initializeHabitat, loadFromRepository, makeModuleFor, makeModuleFor, makeModuleFor, newHabitat, populateConfig, print, registerRunningService, removeRepository, unregisterRunningService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void bundleChanged(org.osgi.framework.BundleEvent event)
bundleChanged in interface org.osgi.framework.BundleListenerprotected void add(com.sun.enterprise.module.Module newModule)
add in class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImplpublic void remove(com.sun.enterprise.module.Module module)
remove in class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImplprotected com.sun.enterprise.module.Module newModule(com.sun.enterprise.module.ModuleDefinition moduleDef)
newModule in class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
public void parseInhabitants(com.sun.enterprise.module.Module module,
java.lang.String name,
com.sun.hk2.component.InhabitantsParser inhabitantsParser)
throws java.io.IOException
parseInhabitants in class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpljava.io.IOExceptionpublic com.sun.enterprise.module.ModulesRegistry createChild()
createChild in interface com.sun.enterprise.module.ModulesRegistrypublic void detachAll()
detachAll in interface com.sun.enterprise.module.ModulesRegistrypublic void shutdown()
shutdown in interface com.sun.enterprise.module.ModulesRegistrypublic void setParentClassLoader(java.lang.ClassLoader parent)
setParentClassLoader in interface com.sun.enterprise.module.ModulesRegistryparent - parent class loaderpublic java.lang.ClassLoader getParentClassLoader()
getParentClassLoader in interface com.sun.enterprise.module.ModulesRegistry
public java.lang.ClassLoader getModulesClassLoader(java.lang.ClassLoader parent,
java.util.Collection<com.sun.enterprise.module.ModuleDefinition> mds,
java.net.URL[] urls)
throws com.sun.enterprise.module.ResolveError
getModulesClassLoader in interface com.sun.enterprise.module.ModulesRegistryparent - the parent class loader for the returned class loader instancemds - module definitions for all modules this classloader should be
capable of loadingurls - urls to be added to the module classloader
com.sun.enterprise.module.ResolveError - if one of the provided module
definition cannot be resolved
public java.lang.ClassLoader getModulesClassLoader(java.lang.ClassLoader parent,
java.util.Collection<com.sun.enterprise.module.ModuleDefinition> defs)
throws com.sun.enterprise.module.ResolveError
getModulesClassLoader in interface com.sun.enterprise.module.ModulesRegistryparent - the parent class loader for the returned class loader instancedefs - module definitions for all modules this classloader should be
capable of loading classes from
com.sun.enterprise.module.ResolveError - if one of the provided module
definition cannot be resolvedpublic com.sun.enterprise.module.Module find(java.lang.Class clazz)
find in interface com.sun.enterprise.module.ModulesRegistrypublic org.osgi.service.packageadmin.PackageAdmin getPackageAdmin()
public void addModuleChangeListener(com.sun.enterprise.module.ModuleChangeListener listener,
OSGiModuleImpl module)
public boolean removeModuleChangeListener(com.sun.enterprise.module.ModuleChangeListener listener)
public void register(com.sun.enterprise.module.ModuleLifecycleListener listener)
register in interface com.sun.enterprise.module.ModulesRegistrypublic void unregister(com.sun.enterprise.module.ModuleLifecycleListener listener)
unregister in interface com.sun.enterprise.module.ModulesRegistry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||