|
||||||||||
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
com.sun.enterprise.module.impl.ModulesRegistryImpl
public class ModulesRegistryImpl
Field Summary |
---|
Fields inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl |
---|
modules, parent, providers, repositories |
Constructor Summary | |
---|---|
ModulesRegistryImpl(AbstractModulesRegistryImpl parent)
|
Method Summary | |
---|---|
ModulesRegistry |
createChild()
Creates a new child ModulesRegistryImpl in this ModulesRegistryImpl . |
void |
detachAll()
Detaches all the modules from this registry. |
Module |
find(Class clazz)
Finds the Module that owns the given class. |
List<ModuleLifecycleListener> |
getLifecycleListeners()
|
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> defs,
URL[] urls)
Returns a ClassLoader capable of loading classes from a set of modules identified by their module definition and also load new urls. |
ClassLoader |
getParentClassLoader()
Returns the parent class loader parenting the class loaders created by modules associated with this registry. |
ModuleImpl |
getProvidingModule(String providerClassName)
Gets the Module that provides the provider of the given name. |
protected Module |
newModule(ModuleDefinition moduleDef)
Factory method for creating new instances of Module. |
protected void |
parseInhabitants(Module module,
String name,
ServiceLocator serviceLocator)
|
void |
register(ModuleLifecycleListener listener)
Add a ModuleLifecycleListener to this registry. |
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, getRepository, getRunningServices, initializeServiceLocator, loadFromRepository, makeModuleFor, makeModuleFor, makeModuleFor, 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 |
Constructor Detail |
---|
public ModulesRegistryImpl(AbstractModulesRegistryImpl parent)
Method Detail |
---|
public ModulesRegistry createChild()
ModulesRegistryImpl
in this ModulesRegistryImpl
.
protected Module newModule(ModuleDefinition moduleDef)
AbstractModulesRegistryImpl
newModule
in class AbstractModulesRegistryImpl
moduleDef
- module definition of the new module to be created
protected void parseInhabitants(Module module, String name, ServiceLocator serviceLocator) throws IOException
parseInhabitants
in class AbstractModulesRegistryImpl
IOException
public ModuleImpl getProvidingModule(String providerClassName)
ModulesRegistry
Module
that provides the provider of the given name.
getProvidingModule
in interface ModulesRegistry
getProvidingModule
in class AbstractModulesRegistryImpl
public void setParentClassLoader(ClassLoader parent)
parent
- parent class loaderpublic ClassLoader getParentClassLoader()
public ClassLoader getModulesClassLoader(ClassLoader parent, Collection<ModuleDefinition> defs, URL[] urls) throws ResolveError
parent
- the parent class loader for the returned class loader instancedefs
- 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 void register(ModuleLifecycleListener listener)
ModuleLifecycleListener
to this registry. The listener
will be notified for each module startup and shutdown.
listener
- the listener implementationpublic void unregister(ModuleLifecycleListener listener)
ModuleLifecycleListener
from this registry.
Notification of module startup and shutdown will not be emitted to this
listener any longer.
listener
- the listener to unregisterpublic List<ModuleLifecycleListener> getLifecycleListeners()
public void detachAll()
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |