|
||||||||||
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.AbstractOSGiModulesRegistryImpl
public abstract class AbstractOSGiModulesRegistryImpl
Field Summary | |
---|---|
protected org.osgi.service.packageadmin.PackageAdmin |
pa
|
Fields inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl |
---|
modules, parent, providers, repositories |
Constructor Summary | |
---|---|
protected |
AbstractOSGiModulesRegistryImpl(org.osgi.framework.BundleContext bctx)
|
Method Summary | |
---|---|
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. |
void |
parseInhabitants(Module module,
String name,
ServiceLocator serviceLocator)
|
void |
register(ModuleLifecycleListener listener)
Add a ModuleLifecycleListener to this 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. |
Methods inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl |
---|
add, add, add, addRepository, addRepository, changed, createInhabitantsParser, createServiceLocator, dumpState, getModules, getModules, getModulesProvider, getProvidersClass, getProvidingModule, getRepository, getRunningServices, initializeServiceLocator, loadFromRepository, makeModuleFor, makeModuleFor, makeModuleFor, newModule, newServiceLocator, newServiceLocator, populateConfig, populateServiceLocator, print, registerRunningService, remove, removeRepository, unregisterRunningService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.osgi.service.packageadmin.PackageAdmin pa
Constructor Detail |
---|
protected AbstractOSGiModulesRegistryImpl(org.osgi.framework.BundleContext bctx)
Method Detail |
---|
public void shutdown()
ModulesRegistry
public void parseInhabitants(Module module, String name, ServiceLocator serviceLocator) throws IOException, BootException
parseInhabitants
in class AbstractModulesRegistryImpl
IOException
BootException
public ModulesRegistry createChild()
ModulesRegistry
ModulesRegistry
in this ModulesRegistry
.
public void detachAll()
ModulesRegistry
public 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 classloader
ResolveError
- 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 from
ResolveError
- if one of the provided module
definition cannot be resolvedpublic Module find(Class clazz)
ModulesRegistry
Module
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)
ModulesRegistry
ModuleLifecycleListener
to this registry. The listener
will be notified for each module startup and shutdown.
listener
- the listener implementationpublic void unregister(ModuleLifecycleListener listener)
ModulesRegistry
ModuleLifecycleListener
from this registry.
Notification of module startup and shutdown will not be emitted to this
listener any longer.
listener
- the listener to unregister
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |