public interface ModuleManager
Modifier and Type | Method and Description |
---|---|
void |
addModuleObserver(ModuleObserver observer)
Register a
ModuleObserver that gets notified when modules are added. |
java.util.List<GatewayModule> |
getGatewayModules()
Returns a list of all modules that have Gateway-scope hooks
|
GatewayModule |
getModule(java.lang.String id)
Finds a module with the given id string.
|
int |
getModuleCount()
The total count of modules currently installed
|
java.util.List<GatewayModule> |
getModules()
Returns a list of all modules
|
ScopeVersionHash |
getVersionHash(int scope)
Retrieve the current hash for a given scope.
|
void |
installModule(java.lang.String filename,
byte[] bytes)
Installs a new module.
|
void |
removeModuleObserver(ModuleObserver observer)
Remove a previously registered
ModuleObserver . |
java.lang.Class<?> |
resolveClass(java.lang.String className)
Loops through each module's classloader, giving it a chance to resolve the given class.
|
void |
restartModule(java.lang.String moduleId)
Restarts the given module.
|
void |
uninstallModule(java.lang.String moduleId)
Uninstalls the given module.
|
java.util.List<GatewayModule> getGatewayModules()
int getModuleCount()
java.util.List<GatewayModule> getModules()
GatewayModule getModule(java.lang.String id)
java.lang.Class<?> resolveClass(java.lang.String className)
ScopeVersionHash getVersionHash(int scope)
ApplicationScope
void uninstallModule(java.lang.String moduleId) throws java.lang.Exception
java.lang.Exception
void restartModule(java.lang.String moduleId) throws java.lang.Exception
java.lang.Exception
void installModule(java.lang.String filename, byte[] bytes) throws java.lang.Exception
filename
- The desired filename for the new module, like "MyModule.modl"bytes
- The *.modl file, as a byte array.java.lang.Exception
void addModuleObserver(ModuleObserver observer)
ModuleObserver
that gets notified when modules are added.observer
- The observer to register.void removeModuleObserver(ModuleObserver observer)
ModuleObserver
.observer
- The observer to unregister.