Difference between revisions of "Reader Activator.java"

From RifidiWiki

Jump to: navigation, search
m (Reverted edits by Amesycyxa (Talk); changed back to last version by Jmaine)
 
(One intermediate revision by one other user not shown)
(No difference)

Latest revision as of 19:41, 26 November 2010

You should only modify Activator.java that was automatically created to create and register the reader--like this (Example taken from ThingMagic Reader):

public class Activator implements BundleActivator  {


	/*
	 * (non-Javadoc)
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		System.out.println("Registered org.rifidi.emulator.reader.thingmagic");
		context.registerService(new String[]{ReaderModule.class.getName()}, new ThingMagicReaderModule(), new Hashtable());
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
		System.out.println("Shutting down org.rifidi.emulator.reader.thingmagic");
	}


}

Notice those those three total lines of code in the methods start and stop. Those are the only lines one has to add then chance ThingMagic or thingmagic to match the name of the reader one is building.

Personal tools