| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRuntime(PropertiesProvider propertiesProvider) |
| Modifier and Type | Method and Description |
|---|---|
<A> A |
adapt(Class<A> type) |
abstract AbstractModule |
createModule(ClassLoader classLoader,
org.jboss.gravia.resource.Resource resource,
Dictionary<String,String> headers) |
Module |
getModule(ClassLoader classLoader)
Returns a module that is associated with the specified class loader.
|
Module |
getModule(long id)
Returns the module with the specified identifier.
|
Module |
getModule(org.jboss.gravia.resource.ResourceIdentity identity)
Returns the module with the specified resource identity.
|
abstract ModuleEntriesProvider |
getModuleEntriesProvider(Module module) |
Set<Module> |
getModules()
Returns the set of all installed modules.
|
Set<Module> |
getModules(ClassLoader classLoader)
Returns the set of installed modules associated with the given class loader.
|
Set<Module> |
getModules(String symbolicName,
org.jboss.gravia.resource.VersionRange range)
Returns the set of installed modules with a given symbolic name or version.
|
Object |
getProperty(String key)
Returns the value of the specified property.
|
Object |
getProperty(String key,
Object defaultValue)
Returns the value of the specified property.
|
Module |
installModule(ClassLoader classLoader,
Dictionary<String,String> headers)
Installs a module with the given ClassLoader and headers dictionary.
|
Module |
installModule(ClassLoader classLoader,
org.jboss.gravia.resource.Resource resource,
Dictionary<String,String> headers)
Installs a module with the given ClassLoader.
|
protected void |
uninstallModule(Module module) |
protected AbstractRuntime(PropertiesProvider propertiesProvider)
public abstract AbstractModule createModule(ClassLoader classLoader, org.jboss.gravia.resource.Resource resource, Dictionary<String,String> headers)
public abstract ModuleEntriesProvider getModuleEntriesProvider(Module module)
public final Object getProperty(String key)
Runtimenull if the property is not found.getProperty in interface Runtimekey - The name of the requested property.null if the
property is undefined.public final Object getProperty(String key, Object defaultValue)
RuntimegetProperty in interface Runtimekey - The name of the requested property.public <A> A adapt(Class<A> type)
public final Module getModule(long id)
Runtimepublic final Module getModule(org.jboss.gravia.resource.ResourceIdentity identity)
Runtimepublic final Module getModule(ClassLoader classLoader)
RuntimeIf multiple modules are associated with the same class loader it returns the first in the natural module order (i.e. the one with the lowest module identifier)
public final Set<Module> getModules()
RuntimeThis method returns a list of all modules installed in the Runtime at the time of the call to this method. However, since the Runtime is a very dynamic environment, modules can be installed or uninstalled at anytime.
getModules in interface RuntimeModules.public final Set<Module> getModules(ClassLoader classLoader)
RuntimegetModules in interface RuntimeModules.public Set<Module> getModules(String symbolicName, org.jboss.gravia.resource.VersionRange range)
RuntimeBoth parameters are optional. If a parameter is null it matches all.
getModules in interface RuntimeModules that match.public final Module installModule(ClassLoader classLoader, Dictionary<String,String> headers) throws ModuleException
Runtime
The module's ResourceIdentity and possible other
capabilities/requirements are generated from the headers.
installModule in interface RuntimeModuleExceptionRuntime.installModule(ClassLoader, Resource, Dictionary)public final Module installModule(ClassLoader classLoader, org.jboss.gravia.resource.Resource resource, Dictionary<String,String> headers) throws ModuleException
Runtime
An explicit Resource parameter takes priority.
The following steps are required to install a module:
INSTALLED.
ModuleEvent.INSTALLED is fired.
RESOLVED.
ModuleEvent.RESOLVED is fired.
Module object for the newly or previously installed module is returned.
installModule in interface RuntimeModuleExceptionprotected void uninstallModule(Module module)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.