Difference between revisions of "Teams Winter 2011/team4/lab2"

From CDOT Wiki
Jump to: navigation, search
(Tutorial)
(Create the Service Interface)
Line 6: Line 6:
 
==Create the Service Interface==
 
==Create the Service Interface==
 
===Define the service interface===
 
===Define the service interface===
 +
*Right click src->New->Interface
 +
:[[Image: T4L2_1.png]]
 +
*Then
 +
 +
:[[Image: T4L2_2.png]]
 +
*Fill in package and name, click Finish
 +
:[[Image: T4L2_3.png]]
 +
*Code at least one method, Save it
 +
 
===Create the bundle with the interface===
 
===Create the bundle with the interface===
 +
*Right click src->New->Class
 +
:[[Image: T4L2_4.png]]
 +
*Then fill in package and name, click finish
 +
:[[Image: T4L2_5.png]]
 +
*Code the method body of sayHello(), save it
 +
:[[Image: T4L2_6.png]]
 +
 
==Implement the Service Provider==
 
==Implement the Service Provider==
 
===Register the service in the class Activator===
 
===Register the service in the class Activator===

Revision as of 17:30, 16 February 2011

Lab 2


Tutorial

Create the Service Interface

Define the service interface

  • Right click src->New->Interface
T4L2 1.png
  • Then
T4L2 2.png
  • Fill in package and name, click Finish
T4L2 3.png
  • Code at least one method, Save it

Create the bundle with the interface

  • Right click src->New->Class
T4L2 4.png
  • Then fill in package and name, click finish
T4L2 5.png
  • Code the method body of sayHello(), save it
T4L2 6.png

Implement the Service Provider

Register the service in the class Activator

Define the MANIFEST.MF for the service provider bundle

Install and run the Service Provider Bundle

Implement the Service Consumer

Define the MANIFEST.MF for the service consumer bundle

Use the class Activator to find the service

Implement a class where one can consume the service

Install and run the Service Consumer Bundle