public abstract class NetigsoFramework extends Object
Modifier | Constructor and Description |
---|---|
protected |
NetigsoFramework() |
Modifier and Type | Method and Description |
---|---|
protected ClassLoader |
createClassLoader(String cnb)
Creates a delegating loader for given module.
|
protected abstract Set<String> |
createLoader(ModuleInfo m,
ProxyClassLoader pcl,
File jar)
Initializes a classloader for given module.
|
protected int |
defaultStartLevel()
Default start level for all bundles that don't specify any own.
|
protected ClassLoader |
findFrameworkClassLoader()
Allows the OSGi support to identify the classloader that loads
all OSGi framework classes.
|
protected Module |
findModule(String cnb)
Finds module for given name.
|
protected Enumeration<URL> |
findResources(Module module,
String resName)
Find given resource inside provide module representing an OSGi bundle.
|
protected byte[] |
fromArchive(ArchiveResources resources,
String name)
Get an array of bytes from archive.
|
protected byte[] |
patchByteCode(ClassLoader l,
String className,
ProtectionDomain pd,
byte[] arr)
Gives OSGi support access to NetBeans bytecode manipulation libraries.
|
protected abstract void |
prepare(Lookup loadFrameworkFrom,
Collection<? extends Module> preregister)
Starts the framework.
|
protected abstract void |
reload(Module m)
Reloads one module
|
protected abstract void |
shutdown()
Shutdowns the framework
|
protected abstract void |
start()
Starts the OSGi framework by activating all bundles that shall be activated.
|
protected abstract Set<String> |
start(Collection<? extends Module> allModules)
Get's ready for start of the OSGi framework.
|
protected abstract void |
stopLoader(ModuleInfo m,
ClassLoader loader)
Deinitializes a classloader for given module
|
protected abstract void prepare(Lookup loadFrameworkFrom, Collection<? extends Module> preregister)
protected abstract Set<String> start(Collection<? extends Module> allModules)
allModules
- the modules that are in the systemprotected abstract void start()
protected abstract void shutdown()
protected abstract Set<String> createLoader(ModuleInfo m, ProxyClassLoader pcl, File jar) throws IOException
m
- the module descriptionpcl
- proxy classloader that shall be configuredjar
- the module JAR fileIOException
protected Enumeration<URL> findResources(Module module, String resName)
Bundle.getEntry
.resName
- name of the resource to seek forprotected abstract void reload(Module m) throws IOException
IOException
protected abstract void stopLoader(ModuleInfo m, ClassLoader loader)
protected ClassLoader findFrameworkClassLoader()
protected int defaultStartLevel()
protected final byte[] fromArchive(ArchiveResources resources, String name) throws IOException
#toArchive(java.lang.String, java.lang.String)
method to store it for next time.name
- name of the resource inside the JARresources
- the provider of the real resourcesIOException
- if something goes wrongprotected final ClassLoader createClassLoader(String cnb)
cnb
- name of the bundle/moduleprotected final Module findModule(String cnb)
cnb
- code name base of the moduleprotected final byte[] patchByteCode(ClassLoader l, String className, ProtectionDomain pd, byte[] arr)
Instrumentation
specification
read more at
architecture document.l
- the classloader that is loading the classclassName
- the class namepd
- protection domain to usearr
- bytecode (must not be modified)IllegalStateException
- if the byte code is not valid