public abstract class AbstractOSGiModulesRegistryImpl extends AbstractModulesRegistryImpl
| Modifier and Type | Field and Description |
|---|---|
protected org.osgi.service.packageadmin.PackageAdmin |
pa |
modules, parent, providers, repositories| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOSGiModulesRegistryImpl(org.osgi.framework.BundleContext bctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModuleChangeListener(ModuleChangeListener listener,
OSGiModuleImpl module) |
ModulesRegistry |
createChild()
Creates a new child
ModulesRegistry in this ModulesRegistry. |
void |
detachAll()
Detaches all the modules from this registry.
|
Module |
find(Class clazz)
Finds the
Module that owns the given class. |
ClassLoader |
getModulesClassLoader(ClassLoader parent,
Collection<ModuleDefinition> defs)
Returns a ClassLoader capable of loading classes from a set of modules identified
by their module definition
|
ClassLoader |
getModulesClassLoader(ClassLoader parent,
Collection<ModuleDefinition> mds,
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() |
ClassLoader |
getParentClassLoader()
Returns the parent class loader parenting the class loaders created
by modules associated with this registry.
|
List<ActiveDescriptor> |
parseInhabitants(Module module,
String name,
ServiceLocator serviceLocator,
List<PopulatorPostProcessor> postProcessors) |
void |
register(ModuleLifecycleListener listener)
Add a
ModuleLifecycleListener to this registry. |
void |
remove(Module module)
Removes a module from the registry.
|
boolean |
removeModuleChangeListener(ModuleChangeListener listener) |
void |
setParentClassLoader(ClassLoader parent)
Sets the classloader parenting the class loaders created by the modules
associated with this registry.
|
void |
shutdown()
Shuts down this module's registry, apply housekeeping tasks
|
void |
unregister(ModuleLifecycleListener listener)
Removes an
ModuleLifecycleListener from this registry. |
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, unregisterRunningServiceprotected AbstractOSGiModulesRegistryImpl(org.osgi.framework.BundleContext bctx)
public void shutdown()
ModulesRegistrypublic List<ActiveDescriptor> parseInhabitants(Module module, String name, ServiceLocator serviceLocator, List<PopulatorPostProcessor> postProcessors) throws IOException, BootException
parseInhabitants in class AbstractModulesRegistryImplIOExceptionBootExceptionpublic ModulesRegistry createChild()
ModulesRegistryModulesRegistry in this ModulesRegistry.public void detachAll()
ModulesRegistrypublic void setParentClassLoader(ClassLoader parent)
parent - parent class loaderpublic ClassLoader getParentClassLoader()
public ClassLoader getModulesClassLoader(ClassLoader parent, Collection<ModuleDefinition> mds, URL[] urls) throws ResolveError
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 classloaderResolveError - if one of the provided module
definition cannot be resolvedpublic ClassLoader getModulesClassLoader(ClassLoader parent, Collection<ModuleDefinition> defs) throws ResolveError
parent - the parent class loader for the returned class loader instancedefs - module definitions for all modules this classloader should be
capable of loading classes fromResolveError - if one of the provided module
definition cannot be resolvedpublic Module find(Class clazz)
ModulesRegistryModule that owns the given class.public org.osgi.service.packageadmin.PackageAdmin getPackageAdmin()
public void addModuleChangeListener(ModuleChangeListener listener, OSGiModuleImpl module)
public boolean removeModuleChangeListener(ModuleChangeListener listener)
public void register(ModuleLifecycleListener listener)
ModulesRegistryModuleLifecycleListener to this registry. The listener
will be notified for each module startup and shutdown.listener - the listener implementationpublic void unregister(ModuleLifecycleListener listener)
ModulesRegistryModuleLifecycleListener from this registry.
Notification of module startup and shutdown will not be emitted to this
listener any longer.listener - the listener to unregisterpublic void remove(Module module)
AbstractModulesRegistryImplremove in class AbstractModulesRegistryImplCopyright © 2014 Oracle Corporation. All rights reserved.