Open main menu

CDOT Wiki β

Changes

Teams Winter 2011/team1/OSGI/Create the Service Interface

353 bytes added, 13:07, 16 February 2011
1. Create the Service Interface
'''1.2. Create Interfaces'''<br/>
Add a package to the src folder in your project.Then Add following ttems items to your package:
# A Java class named BusRoute.
# A Java class named BusRouteNotFoundException which extends java.lang.Exceptions class.
# A Java class named InvalidNumberOfSeatsException which extends java.lang.Exception class.
# An Interface named Ticketing
:[[Image: 5CreateInterfaces.jpg| 800px]]
:Enter the code for the classes and the interface as per the following screenshotsscreen-shots:
:'''BusRout Class:'''
:[[Image: 6CreateNewClass.jpg | 700px]]
:'''BusRoutNotFoundException Class:'''
:[[Image: 7CreateNewClass.jpg | 700px]]
:'''InvalidNumberOfSeatsException Class:'''
:[[Image: 71CreateNewClass.jpg | 700px]]
:'''Ticketing Interface:'''
:[[Image: 8CreateInterface.jpg | 700px]]
:[[Image: 9ExportPackge.jpg | 700px]]
 
:Select the Ticketing package and press Ok button.
:[[Image: 10ExportPackage.jpg | 400px]]
:[[Image: 11ExportPackage12ExportPackage.jpg | 400px]] :The Interface is Exported and now it's time to build the service implementation project where you add all the implementations of the interface and register it at run time.
1
edit