Difference between revisions of "Reader Activator.java"

From RifidiWiki

Jump to: navigation, search
(New page: You should only modify Activator.java that was automatically created to create and register the reader--like this (Example taken from ThingMagic Reader): <pre><nowiki> public class Activat...)
 
m (Reverted edits by Amesycyxa (Talk); changed back to last version by Jmaine)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[category:developerDoc]][[category:emulatorDoc]]
 
You should only modify Activator.java that was automatically created to create and register the reader--like this (Example taken from ThingMagic Reader):
 
You should only modify Activator.java that was automatically created to create and register the reader--like this (Example taken from ThingMagic Reader):
 
<pre><nowiki>
 
<pre><nowiki>

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