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
public class SingleModulesRegistry extends ModulesRegistryImpl
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
Fields Modifier and Type Field Description (package private) Module[]proxyMod(package private) java.lang.ClassLoadersingleClassLoader-
Fields inherited from class com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl
modules, parent, providers, repositories
-
-
Constructor Summary
Constructors Constructor Description SingleModulesRegistry(java.lang.ClassLoader singleCL)SingleModulesRegistry(java.lang.ClassLoader singleCL, java.util.List<ManifestProxy.SeparatorMappings> mappings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Modulefind(java.lang.Class clazz)Finds theModulethat owns the given class.java.util.Collection<Module>getModules()Returns the list of shared Modules registered in this instance.java.util.Collection<Module>getModules(java.lang.String moduleName)Returns the list of shared Modules registered in this instance whose name matches the given nameModulemakeModuleFor(java.lang.String name, java.lang.String version, boolean resolve)Returns theModuleinstance giving a name and version constraints.protected java.util.List<ActiveDescriptor>parseInhabitants(Module module, java.lang.String name, ServiceLocator serviceLocator, java.util.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 Detail
-
singleClassLoader
final java.lang.ClassLoader singleClassLoader
-
proxyMod
final Module[] proxyMod
-
-
Constructor Detail
-
SingleModulesRegistry
public SingleModulesRegistry(java.lang.ClassLoader singleCL)
-
SingleModulesRegistry
public SingleModulesRegistry(java.lang.ClassLoader singleCL, java.util.List<ManifestProxy.SeparatorMappings> mappings)
-
-
Method Detail
-
find
public Module find(java.lang.Class clazz)
Description copied from interface:ModulesRegistryFinds theModulethat owns the given class.- Specified by:
findin interfaceModulesRegistry- Overrides:
findin classModulesRegistryImpl- Returns:
- null if the class is loaded outside the module system.
-
getModules
public java.util.Collection<Module> getModules(java.lang.String moduleName)
Description copied from interface:ModulesRegistryReturns 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
ModulesRegistrys.- Specified by:
getModulesin interfaceModulesRegistry- Overrides:
getModulesin classAbstractModulesRegistryImpl- Returns:
- an umodifiable list of loaded modules having names that match the given name
-
getModules
public java.util.Collection<Module> getModules()
Description copied from class:AbstractModulesRegistryImplReturns the list of shared Modules registered in this instance.The returned list will not include the modules defined in the ancestor
AbstractModulesRegistryImpls.- Specified by:
getModulesin interfaceModulesRegistry- Overrides:
getModulesin classAbstractModulesRegistryImpl- Returns:
- an umodifiable list of loaded modules
-
makeModuleFor
public Module makeModuleFor(java.lang.String name, java.lang.String version, boolean resolve) throws ResolveError
Description copied from interface:ModulesRegistryReturns theModuleinstance giving a name and version constraints.- Specified by:
makeModuleForin interfaceModulesRegistry- Overrides:
makeModuleForin 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 java.util.List<ActiveDescriptor> parseInhabitants(Module module, java.lang.String name, ServiceLocator serviceLocator, java.util.List<PopulatorPostProcessor> postProcessors) throws java.io.IOException
- Overrides:
parseInhabitantsin classModulesRegistryImpl- Throws:
java.io.IOException
-
-