Reader Activator.java

From RifidiWiki

Revision as of 19:41, 26 November 2010 by Matt (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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