Package org.nuxeo.runtime.osgi
Class OSGiRuntimeActivator
java.lang.Object
org.nuxeo.runtime.osgi.OSGiRuntimeActivator
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
- Direct Known Subclasses:
OSGIRuntimeTestActivator
The default BundleActivator for NXRuntime over an OSGi comp. platform.
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionprotected OSGiComponentLoader
protected org.osgi.framework.BundleContext
protected org.osgi.framework.ServiceReference
protected OSGiRuntimeService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.osgi.framework.Bundle
static OSGiRuntimeActivator
protected void
initialize
(AbstractRuntimeService runtime) Gives a chance to derived classes to initialize them before the runtime is started.Class<?>
Load a class from another bundle given its reference asbundleSymbolicName:className
If nobundleSymbolicName:
prefix is given then a classForName will be doneClass<?>
newInstance
(String ref) newInstance
(String bundleName, String className) void
start
(org.osgi.framework.BundleContext context) void
stop
(org.osgi.framework.BundleContext context) protected void
uninitialize
(AbstractRuntimeService runtime) Gives a chance to derived classes to uninitialize them after the runtime is stopped.
-
Field Details
-
runtime
-
componentLoader
-
pkgAdmin
protected org.osgi.framework.ServiceReference pkgAdmin -
context
protected org.osgi.framework.BundleContext context
-
-
Constructor Details
-
OSGiRuntimeActivator
public OSGiRuntimeActivator()
-
-
Method Details
-
getInstance
-
start
public void start(org.osgi.framework.BundleContext context) - Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
-
stop
public void stop(org.osgi.framework.BundleContext context) - Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
-
getBundle
-
loadClass
Load a class from another bundle given its reference asbundleSymbolicName:className
If nobundleSymbolicName:
prefix is given then a classForName will be done- Throws:
ReflectiveOperationException
-
loadClass
- Throws:
ReflectiveOperationException
-
newInstance
- Throws:
ReflectiveOperationException
-
newInstance
- Throws:
ReflectiveOperationException
-
initialize
Gives a chance to derived classes to initialize them before the runtime is started.- Parameters:
runtime
- the current runtime
-
uninitialize
Gives a chance to derived classes to uninitialize them after the runtime is stopped.- Parameters:
runtime
- the current runtime
-