fr.velossity.sample.device.impl.Activator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ConsumerAP Show documentation
Show all versions of ConsumerAP Show documentation
Sample of consumer looking for a producer and getting new measures
The newest version!
package fr.velossity.sample.device.impl;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
/**
* Bundle activator, just instantiates a Consumer at activation.
* @author C. Saint-Marcel
*
*/
public class Activator implements BundleActivator {
private Consumer myConsumer;
/**
* @see BundleActivator#start(BundleContext)
*/
public void start(BundleContext context) throws Exception {
myConsumer = new Consumer();
myConsumer.activate(context);
}
/**
* @see BundleActivator#stop(BundleContext)
*/
public void stop(BundleContext context) throws Exception {
myConsumer.deactivate(context);
}
}