Package org.jboss.modules
Class DelegatingModuleLoader
java.lang.Object
org.jboss.modules.ModuleLoader
org.jboss.modules.DelegatingModuleLoader
- Direct Known Subclasses:
LocalModuleLoader
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
ConstructorsConstructorDescriptionDelegatingModuleLoader
(ModuleLoader delegate, ModuleFinder finder) Construct a new instance.DelegatingModuleLoader
(ModuleLoader delegate, ModuleFinder[] finders) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected Module
preloadModule
(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 Details
-
DelegatingModuleLoader
Construct a new instance.- Parameters:
delegate
- the delegate module loader, ornull
to skip delegationfinders
- the module finders (must not benull
)
-
DelegatingModuleLoader
Construct a new instance.- Parameters:
delegate
- the delegate module loader, ornull
to skip delegationfinder
- the single module finder (must not benull
)
-
-
Method Details
-
preloadModule
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
-