org.jvnet.hk2.osgiadapter
Class AbstractOSGiModulesRegistryImpl
java.lang.Object
com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
org.jvnet.hk2.osgiadapter.AbstractOSGiModulesRegistryImpl
- All Implemented Interfaces:
- ModuleChangeListener, ModulesRegistry
- Direct Known Subclasses:
- OSGiModulesRegistryImpl, OSGiObrModulesRegistryImpl
public abstract class AbstractOSGiModulesRegistryImpl
- extends AbstractModulesRegistryImpl
- Author:
- sanjeeb.sahoo@oracle.com
|
Field Summary |
protected org.osgi.service.packageadmin.PackageAdmin |
pa
|
| Methods inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl |
add, add, add, addRepository, addRepository, changed, createServiceLocator, createServiceLocator, createServiceLocator, dumpState, getAllServiceLocators, getModules, getModules, getModulesProvider, getProvidersClass, getProvidingModule, getRepository, getRunningServices, initializeServiceLocator, loadFromRepository, makeModuleFor, makeModuleFor, makeModuleFor, newModule, newServiceLocator, newServiceLocator, populateConfig, populateServiceLocator, print, registerRunningService, removeRepository, unregisterRunningService |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pa
protected org.osgi.service.packageadmin.PackageAdmin pa
AbstractOSGiModulesRegistryImpl
protected AbstractOSGiModulesRegistryImpl(org.osgi.framework.BundleContext bctx)
shutdown
public void shutdown()
parseInhabitants
public java.util.List<ActiveDescriptor> parseInhabitants(Module module,
java.lang.String name,
ServiceLocator serviceLocator,
java.util.List<PopulatorPostProcessor> postProcessors)
throws java.io.IOException,
BootException
- Specified by:
parseInhabitants in class AbstractModulesRegistryImpl
- Throws:
java.io.IOException
BootException
createChild
public ModulesRegistry createChild()
detachAll
public void detachAll()
setParentClassLoader
public void setParentClassLoader(java.lang.ClassLoader parent)
- Sets the classloader parenting the class loaders created by the modules
associated with this registry.
- Parameters:
parent - parent class loader
getParentClassLoader
public java.lang.ClassLoader getParentClassLoader()
- Returns the parent class loader parenting the class loaders created
by modules associated with this registry.
- Returns:
- the parent classloader
getModulesClassLoader
public java.lang.ClassLoader getModulesClassLoader(java.lang.ClassLoader parent,
java.util.Collection<ModuleDefinition> mds,
java.net.URL[] urls)
throws ResolveError
- Returns a ClassLoader capable of loading classes from a set of modules identified
by their module definition and also load new urls.
- Parameters:
parent - 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
- Returns:
- class loader instance
- Throws:
ResolveError - if one of the provided module
definition cannot be resolved
getModulesClassLoader
public java.lang.ClassLoader getModulesClassLoader(java.lang.ClassLoader parent,
java.util.Collection<ModuleDefinition> defs)
throws ResolveError
- Returns a ClassLoader capable of loading classes from a set of modules identified
by their module definition
- Parameters:
parent - the parent class loader for the returned class loader instancedefs - module definitions for all modules this classloader should be
capable of loading classes from
- Returns:
- class loader instance
- Throws:
ResolveError - if one of the provided module
definition cannot be resolved
find
public Module find(java.lang.Class clazz)
getPackageAdmin
public org.osgi.service.packageadmin.PackageAdmin getPackageAdmin()
addModuleChangeListener
public void addModuleChangeListener(ModuleChangeListener listener,
OSGiModuleImpl module)
removeModuleChangeListener
public boolean removeModuleChangeListener(ModuleChangeListener listener)
register
public void register(ModuleLifecycleListener listener)
unregister
public void unregister(ModuleLifecycleListener listener)
remove
public void remove(Module module)
- Overrides:
remove in class AbstractModulesRegistryImpl
Copyright © 2013 Oracle Corporation. All Rights Reserved.