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
FieldsModifier and TypeFieldDescriptionprotected OSGiComponentLoaderprotected org.osgi.framework.BundleContextprotected org.osgi.framework.ServiceReferenceprotected OSGiRuntimeService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.osgi.framework.Bundlestatic OSGiRuntimeActivatorprotected voidinitialize(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:classNameIf nobundleSymbolicName:prefix is given then a classForName will be doneClass<?> newInstance(String ref) newInstance(String bundleName, String className) voidstart(org.osgi.framework.BundleContext context) voidstop(org.osgi.framework.BundleContext context) protected voiduninitialize(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:
startin interfaceorg.osgi.framework.BundleActivator
-
stop
public void stop(org.osgi.framework.BundleContext context) - Specified by:
stopin interfaceorg.osgi.framework.BundleActivator
-
getBundle
-
loadClass
Load a class from another bundle given its reference asbundleSymbolicName:classNameIf 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
-