Difference between revisions of "Teams Winter 2011/team1/OSGI/Create the Service Interface"

From CDOT Wiki
Jump to: navigation, search
(1. Create the Service Interface)
(1. Create the Service Interface)
Line 12: Line 12:
 
:[[Image: 4CreateNewPlugInProject.jpg | 800px]]
 
:[[Image: 4CreateNewPlugInProject.jpg | 800px]]
  
'''1.2. Create Interfaces'''
+
'''1.2. Create Interfaces'''<br/>
Add a package to the src folder in your project.
+
Add a package to the src folder in your project.Then Add a Java class named BusRoute. Add another java class named BusRouteNotFoundException which extends java.lang.Exceptions class.
 
:[[Image: 5CreateInterfaces.jpg| 800px]]
 
:[[Image: 5CreateInterfaces.jpg| 800px]]
  

Revision as of 17:29, 14 February 2011

1. Create the Service Interface

First thing to do in building an OSGI application is to define the service interface so that the developer who creates the GUI part of application knows what services will be available, and what are their requirements and outcome.In order to do this please follow these steps:

1.1. Create the interface bundle

Create a new Plug-in project in eclipse using File>New> Plug-in Project:
1CreateNewPlugInProject.JPG
Give it a proper name and Choose the target platform to be an OSGI platform:
2CreateNewPlugInProject.jpg
Make sure you check off the , so that no Activator class is created in the project (this bundel is just interfaces so it does not run).
3CreateNewPlugInProject.jpg
4CreateNewPlugInProject.jpg

1.2. Create Interfaces
Add a package to the src folder in your project.Then Add a Java class named BusRoute. Add another java class named BusRouteNotFoundException which extends java.lang.Exceptions class.

5CreateInterfaces.jpg
700px
700px
700px
700px
700px
700px
700px
700px
700px
700px