Difference between revisions of "Teams Winter 2011/team6/lab2"
(Created page with ' Lab 2 OSGI Tutorial After downloading the “Eclipse classic” from http://www.eclipse.org/downloads/ then proceed with the following steps to create Chat Program with OSGi. …') |
|||
Line 1: | Line 1: | ||
− | + | =Lab 2 OSGI Tutorial= | |
− | |||
− | Lab 2 OSGI Tutorial | ||
− | |||
After downloading the “Eclipse classic” from http://www.eclipse.org/downloads/ then proceed with the following steps to create Chat Program with OSGi. | After downloading the “Eclipse classic” from http://www.eclipse.org/downloads/ then proceed with the following steps to create Chat Program with OSGi. | ||
− | + | ==Create the Chat Interface== | |
The first step is to create the Chat Interface which is the Service Provider in the Program. This defines and provides the services available and the requirements and outcomes for those services. | The first step is to create the Chat Interface which is the Service Provider in the Program. This defines and provides the services available and the requirements and outcomes for those services. | ||
− | + | ===Define the service interface=== | |
a) Create a new Plug-in Project | a) Create a new Plug-in Project | ||
Line 17: | Line 14: | ||
c) Be sure to uncheck the “Generate an activator” option as you will not be needing an activator then go ahead and click finish. | c) Be sure to uncheck the “Generate an activator” option as you will not be needing an activator then go ahead and click finish. | ||
− | + | ===Create the bundle with the interface=== | |
a) You must now create three interfaces: IChatClient, IChatSystem and IMessage | a) You must now create three interfaces: IChatClient, IChatSystem and IMessage | ||
Line 25: | Line 22: | ||
b) Fill the interfaces with the following information: | b) Fill the interfaces with the following information: | ||
− | + | ===Export the Package=== | |
+ | To register our service we must export the package into the interface bundle | ||
a) Select the MANIFEST.MF | a) Select the MANIFEST.MF |
Revision as of 12:16, 12 April 2011
Contents
Lab 2 OSGI Tutorial
After downloading the “Eclipse classic” from http://www.eclipse.org/downloads/ then proceed with the following steps to create Chat Program with OSGi.
Create the Chat Interface
The first step is to create the Chat Interface which is the Service Provider in the Program. This defines and provides the services available and the requirements and outcomes for those services.
Define the service interface
a) Create a new Plug-in Project
b) Name your Plug-in Project (cs.dps914.osgi.lab.chatinterface) and be sure to select the target platform (OSGi framework: Equinox)
c) Be sure to uncheck the “Generate an activator” option as you will not be needing an activator then go ahead and click finish.
Create the bundle with the interface
a) You must now create three interfaces: IChatClient, IChatSystem and IMessage
Be sure to edit the package name and the Interface Name.
b) Fill the interfaces with the following information:
Export the Package
To register our service we must export the package into the interface bundle
a) Select the MANIFEST.MF
b) In the Runtime tab select Add
c) Select the chatinterface package