| package org.eclipse.ecf.tests.internal.osgi.discovery; |
| |
| import org.osgi.framework.BundleActivator; |
| import org.osgi.framework.BundleContext; |
| |
| public class Activator implements BundleActivator { |
| |
| public static final String BUNDLE_NAME = "org.eclipse.ecf.tests.osgi.services.discovery"; //$NON-NLS-1$ |
| |
| private BundleContext context; |
| private static Activator plugin; |
| |
| public static Activator getDefault() { |
| return plugin; |
| } |
| /* |
| * (non-Javadoc) |
| * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) |
| */ |
| public void start(BundleContext context) throws Exception { |
| plugin = this; |
| this.context = context; |
| } |
| |
| /* |
| * (non-Javadoc) |
| * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) |
| */ |
| public void stop(BundleContext context) throws Exception { |
| this.context = null; |
| plugin = null; |
| } |
| |
| public BundleContext getContext() { |
| return context; |
| } |
| |
| } |