public class OSGiObrModuleImpl extends OSGiModuleImpl
| Constructor and Description |
|---|
OSGiObrModuleImpl(OSGiObrModulesRegistryImpl registry,
org.osgi.framework.Bundle bundle,
ModuleDefinition moduleDef) |
OSGiObrModuleImpl(OSGiObrModulesRegistryImpl registry,
File file) |
OSGiObrModuleImpl(OSGiObrModulesRegistryImpl registry,
ModuleDefinition moduleDef) |
| Modifier and Type | Method and Description |
|---|---|
void |
detach()
Detach this module from its registry.
|
void |
dumpState(PrintStream writer) |
ClassLoader |
getClassLoader()
Return the
ClassLoader instance associated with this module. |
List<Module> |
getImports()
Returns the list of imported modules.
|
OSGiObrModulesRegistryImpl |
getRegistry()
Returns the registry owning this module
|
ModuleState |
getState()
Returns the module's state
|
void |
refresh()
Trigger manual refresh mechanism, the module will check all its
URLs and generate change events if any of them has changed.
|
void |
resolve()
Ensure that this module is
resolved. |
void |
start()
Forces module startup.
|
boolean |
stop()
Forces module stop.
|
String |
toString() |
void |
uninstall()
Removes the module from the registry backing store, the module will need
be reinstalled to be loaded.
|
addImport, addImport, addListener, equals, getBundle, getMetadata, getModuleDefinition, getName, getProvidersClass, getProvidersClass, hashCode, hasProvider, isShared, isSticky, isTransientlyActive, removeListener, setBundle, setStickypublic OSGiObrModuleImpl(OSGiObrModulesRegistryImpl registry, File file) throws IOException
IOExceptionpublic OSGiObrModuleImpl(OSGiObrModulesRegistryImpl registry, ModuleDefinition moduleDef)
public OSGiObrModuleImpl(OSGiObrModulesRegistryImpl registry, org.osgi.framework.Bundle bundle, ModuleDefinition moduleDef)
public OSGiObrModulesRegistryImpl getRegistry()
ModulegetRegistry in interface ModulegetRegistry in class OSGiModuleImplpublic ModuleState getState()
ModulegetState in interface ModulegetState in class OSGiModuleImplpublic void resolve()
throws ResolveError
Moduleresolved.
If the module is already resolved, this method does nothing.
Otherwise, iterate over all declared ModuleDependency instances and use the
associated ModuleRegistry to resolve it. After successful
completion of this method, the module state is
ModuleState.RESOLVED.
resolve in interface Moduleresolve in class OSGiModuleImplResolveError - if any of the declared dependency of this module
cannot be satisfiedpublic void start()
throws ResolveError
ModuleModuleState.READY, the
Lifecycle.start method will be invoked.start in interface Modulestart in class OSGiModuleImplResolveErrorpublic boolean stop()
ModuleLifecyclePolicy for this module is defined, the
Lifecycle.stop(Module)
method will be called and finally the module state will be
returned to ModuleState.NEW.stop in interface Modulestop in class OSGiModuleImplpublic void detach()
Moduledetach in interface Moduledetach in class OSGiModuleImplpublic void uninstall()
Moduleuninstall in interface Moduleuninstall in class OSGiModuleImplpublic void refresh()
Modulerefresh in interface Modulerefresh in class OSGiModuleImplpublic void dumpState(PrintStream writer)
dumpState in interface ModuledumpState in class OSGiModuleImplpublic ClassLoader getClassLoader()
ModuleClassLoader instance associated with this module.
Only designated public interfaces will be loaded and returned by
this classloadergetClassLoader in interface ModulegetClassLoader in class OSGiModuleImplClassLoaderpublic List<Module> getImports()
Module
This is the module version of ModuleDefinition.getDependencies(),
but after fully resolved.
To enforce the stable class visibility, once Module is
created, dependencies cannot be changed — that is, we
don't want "a.b.C" to suddenly mean something different once
the code starts running.
getImports in interface ModulegetImports in class OSGiModuleImplpublic String toString()
toString in class OSGiModuleImplCopyright © 2014 Oracle Corporation. All rights reserved.