package com.uc.cep.examples;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
/**
* An OSGi BundleActivator implementation which initialises and starts the testing.
* @author Andrew Upton, Upton Consulting GmbH 2017
*
*/
public class LocalBundleActivator implements BundleActivator
{
private static BundleContext context;
private static ChannelHelper channelHelper;
private static TestBase tester;
public static BundleContext getContext()
{
return context;
}
public static ChannelHelper getChannelHelper()
{
return channelHelper;
}
@Override
public void start(BundleContext bundleContext) throws Exception
{
this.context = bundleContext;
channelHelper = new ChannelHelper();
}
@Override
public void stop(BundleContext bundleContext) throws Exception
{
channelHelper = null;
this.context = null;
}
public static TestBase getTester()
{
return tester;
}
public static void setTester(TestBase tester)
{
LocalBundleActivator.tester = tester;
}
}
One the Job with Upton Consulting