|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.modules.ModuleLoader
org.jboss.modules.ClassifyingModuleLoader
public final class ClassifyingModuleLoader
A module loader which selects a delegate module loader based upon the prefix of the module name. Longer names are matched first always.
| Constructor Summary | |
|---|---|
ClassifyingModuleLoader(String name,
Map<String,ModuleLoader> delegates,
ModuleLoader defaultLoader)
Construct a new instance. |
|
| Method Summary | |
|---|---|
protected ModuleSpec |
findModule(ModuleIdentifier moduleIdentifier)
Find a Module's specification in this ModuleLoader by its identifier. |
protected Module |
preloadModule(ModuleIdentifier moduleIdentifier)
Preload a module based on an identifier. |
void |
setDelegates(Map<String,ModuleLoader> delegates)
Change the delegates map. |
String |
toString()
Get the string representation of this module loader. |
| Methods inherited from class org.jboss.modules.ModuleLoader |
|---|
findLoadedModuleLocal, forClass, forClassLoader, loadModule, loadModuleLocal, preloadExportedModule, preloadModule, refreshResourceLoaders, relink, setAndRefreshResourceLoaders, setAndRelinkDependencies, unloadModuleLocal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClassifyingModuleLoader(String name,
Map<String,ModuleLoader> delegates,
ModuleLoader defaultLoader)
delegates - the default delegates map to usedefaultLoader - the default loader to use if no delegate mapping exists| Method Detail |
|---|
protected Module preloadModule(ModuleIdentifier moduleIdentifier)
throws ModuleLoadException
ModuleLoader.loadModuleLocal(ModuleIdentifier). A delegating module loader may delegate to the appropriate module
loader based on loader-specific criteria (via the ModuleLoader.preloadModule(ModuleIdentifier, ModuleLoader) method).
preloadModule in class ModuleLoadermoduleIdentifier - the module identifier
null if the module is not found
ModuleLoadException - if an error occurs
protected ModuleSpec findModule(ModuleIdentifier moduleIdentifier)
throws ModuleLoadException
null.
If the module is found but some problem occurred (for example, a transitive dependency failed to load) then this
method should throw a ModuleLoadException of the relevant type.
findModule in class ModuleLoadermoduleIdentifier - The modules Identifier
null if no module is found with the given identifier
ModuleLoadException - if any problems occur finding the modulepublic void setDelegates(Map<String,ModuleLoader> delegates)
delegates - the new delegates map to usepublic String toString()
ModuleLoader
toString in class ModuleLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||