Package org.jboss.modules
Class DelegatingModuleLoader
- java.lang.Object
-
- org.jboss.modules.ModuleLoader
-
- org.jboss.modules.DelegatingModuleLoader
-
- Direct Known Subclasses:
LocalModuleLoader
public class DelegatingModuleLoader extends ModuleLoader
A module loader which searches its finders first, and then delegates to another loader if the module is not found.
-
-
Field Summary
-
Fields inherited from class org.jboss.modules.ModuleLoader
NO_FINDERS
-
-
Constructor Summary
Constructors Constructor Description DelegatingModuleLoader(ModuleLoader delegate, ModuleFinder finder)
Construct a new instance.DelegatingModuleLoader(ModuleLoader delegate, ModuleFinder[] finders)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Module
preloadModule(java.lang.String name)
Preload the named module.-
Methods inherited from class org.jboss.modules.ModuleLoader
findLoadedModuleLocal, findLoadedModuleLocal, findModule, findModule, forClass, forClassLoader, getDependencies, getFinders, getModuleDescription, installMBeanServer, iterateModules, iterateModules, loadModule, loadModule, loadModuleLocal, loadModuleLocal, preloadExportedModule, preloadExportedModule, preloadModule, preloadModule, preloadModule, refreshResourceLoaders, relink, setAndRefreshResourceLoaders, setAndRelinkDependencies, toString, unloadModuleLocal, unloadModuleLocal
-
-
-
-
Constructor Detail
-
DelegatingModuleLoader
public DelegatingModuleLoader(ModuleLoader delegate, ModuleFinder[] finders)
Construct a new instance.- Parameters:
delegate
- the delegate module loader, ornull
to skip delegationfinders
- the module finders (must not benull
)
-
DelegatingModuleLoader
public DelegatingModuleLoader(ModuleLoader delegate, ModuleFinder finder)
Construct a new instance.- Parameters:
delegate
- the delegate module loader, ornull
to skip delegationfinder
- the single module finder (must not benull
)
-
-
Method Detail
-
preloadModule
protected Module preloadModule(java.lang.String name) throws ModuleLoadException
Preload the named module.- Overrides:
preloadModule
in classModuleLoader
- Parameters:
name
- the module name (must not benull
)- Returns:
- the loaded module, or
null
if it is not found in this loader or the delegate - Throws:
ModuleLoadException
- if the module was found but failed to be loaded
-
-