Package com.sun.enterprise.module.single
Class SingleModulesRegistry
java.lang.Object
com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
com.sun.enterprise.module.impl.ModulesRegistryImpl
com.sun.enterprise.module.single.SingleModulesRegistry
- All Implemented Interfaces:
ModuleChangeListener
,ModulesRegistry
- Direct Known Subclasses:
StaticModulesRegistry
Normal modules registry with configuration handling backed up
by a single class loader. There is one virtual module available in the modules
registry and that module's class loader is the single class loader used to
load all artifacts.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Module[]
(package private) final ClassLoader
Fields inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
modules, parent, providers, repositories
-
Constructor Summary
ConstructorsConstructorDescriptionSingleModulesRegistry
(ClassLoader singleCL) SingleModulesRegistry
(ClassLoader singleCL, List<ManifestProxy.SeparatorMappings> mappings) -
Method Summary
Modifier and TypeMethodDescriptionFinds theModule
that owns the given class.Returns the list of shared Modules registered in this instance.getModules
(String moduleName) Returns the list of shared Modules registered in this instance whose name matches the given namemakeModuleFor
(String name, String version, boolean resolve) Returns theModule
instance giving a name and version constraints.protected List
<ActiveDescriptor> parseInhabitants
(Module module, String name, ServiceLocator serviceLocator, List<PopulatorPostProcessor> postProcessors) Methods inherited from class com.sun.enterprise.module.impl.ModulesRegistryImpl
createChild, detachAll, getLifecycleListeners, getModulesClassLoader, getModulesClassLoader, getParentClassLoader, getProvidingModule, newModule, register, setParentClassLoader, shutdown, unregister
Methods inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
add, add, add, addRepository, addRepository, changed, createServiceLocator, createServiceLocator, createServiceLocator, dumpState, getAllServiceLocators, getModulesProvider, getProvidersClass, getRepository, getRunningServices, initializeServiceLocator, loadFromRepository, makeModuleFor, makeModuleFor, newServiceLocator, newServiceLocator, populateConfig, populateServiceLocator, print, registerRunningService, remove, removeRepository, unregisterRunningService
-
Field Details
-
singleClassLoader
-
proxyMod
-
-
Constructor Details
-
SingleModulesRegistry
-
SingleModulesRegistry
-
-
Method Details
-
find
Description copied from interface:ModulesRegistry
Finds theModule
that owns the given class.- Specified by:
find
in interfaceModulesRegistry
- Overrides:
find
in classModulesRegistryImpl
- Returns:
- null if the class is loaded outside the module system.
-
getModules
Description copied from interface:ModulesRegistry
Returns the list of shared Modules registered in this instance whose name matches the given nameThe returned list will not include the modules defined in the ancestor
ModulesRegistry
s.- Specified by:
getModules
in interfaceModulesRegistry
- Overrides:
getModules
in classAbstractModulesRegistryImpl
- Returns:
- an umodifiable list of loaded modules having names that match the given name
-
getModules
Description copied from class:AbstractModulesRegistryImpl
Returns the list of shared Modules registered in this instance.The returned list will not include the modules defined in the ancestor
AbstractModulesRegistryImpl
s.- Specified by:
getModules
in interfaceModulesRegistry
- Overrides:
getModules
in classAbstractModulesRegistryImpl
- Returns:
- an umodifiable list of loaded modules
-
makeModuleFor
Description copied from interface:ModulesRegistry
Returns theModule
instance giving a name and version constraints.- Specified by:
makeModuleFor
in interfaceModulesRegistry
- Overrides:
makeModuleFor
in classAbstractModulesRegistryImpl
- Parameters:
name
- the module nameversion
- the module version. Caller should specify a correct version.resolve
- should the module be resolved or not- Returns:
- the module instance or null if none can be found
- Throws:
ResolveError
- if the module dependencies cannot be resolved
-
parseInhabitants
protected List<ActiveDescriptor> parseInhabitants(Module module, String name, ServiceLocator serviceLocator, List<PopulatorPostProcessor> postProcessors) throws IOException - Overrides:
parseInhabitants
in classModulesRegistryImpl
- Throws:
IOException
-