{@code ModuleContext} methods allow a module to:
A {@code ModuleContext} object will be created for a module when the moduleis started. The {@code Module} object associated with a {@code ModuleContext}object is called the context module.
The {@code ModuleContext} object will be passed to the{@link ModuleActivator#start(ModuleContext)} method during activation of thecontext module. The same {@code ModuleContext} object will be passed to the{@link ModuleActivator#stop(ModuleContext)} method when the context module isstopped. A {@code ModuleContext} object is generally for the private use ofits associated module and is not meant to be shared with other modules in the environment.
The {@code ModuleContext} object is only valid during the execution of itscontext module; that is, during the period from when the context module is in the {@code STARTING}, {@code STOPPING}, and {@code ACTIVE} module states. Ifthe {@code ModuleContext} object is used subsequently, an{@code IllegalStateException} must be thrown. The {@code ModuleContext}object must never be reused after its context module is stopped.
Two {@code ModuleContext} objects are equal if they both refer to the sameexecution context of a module. The Runtime is the only entity that can create {@code ModuleContext} objects and they are only valid within theRuntime that created them.
A {@link Module} can be {@link Module#adapt(Class) adapted} to its{@code ModuleContext}. @author thomas.diesler@jboss.com @since 27-Sep-2013 @ThreadSafe
|
|
|
|