public class SandboxedModuleManager extends Object implements SandboxedModuleHelper, FeatureStateListener
| Constructor and Description |
|---|
SandboxedModuleManager()
Initializes the module manager and registers a feature state listener.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configureInstalledFeatures()
Initializes installed features and applies their resource policies (if provided).
|
SandboxedModule |
getCurrentModule()
Returns the
SandboxedModule associated with the current thread context. |
SandboxedModule |
getModule(String moduleName)
Returns the
SandboxedModule that owns the given module name. |
void |
stateChanged(Feature app,
Feature.State previousState)
Called when the state of a Feature has changed.
|
public SandboxedModuleManager()
public void configureInstalledFeatures()
configureInstalledFeatures in interface SandboxedModuleHelperpublic SandboxedModule getCurrentModule()
SandboxedModuleHelperSandboxedModule associated with the current thread context.getCurrentModule in interface SandboxedModuleHelperSandboxedModule owning the current execution context.@Nullable public SandboxedModule getModule(String moduleName)
SandboxedModuleHelperSandboxedModule that owns the given module name.getModule in interface SandboxedModuleHelpermoduleName - the name of the module to look up.SandboxedModule, or null if none found.public void stateChanged(Feature app, @Nullable Feature.State previousState)
FeatureStateListenerstateChanged in interface FeatureStateListenerapp - the Feature which state has changedpreviousState - the previous state, null if Feature state is Feature.State.INSTALLED