OSGi : Develop Simple Apps
Main Page · Course Description · Course Topics · Schedule, Students, Teams · Course Resources · Course Projects
OSGi Activities
- Start and run the Eclipse for OSGi as installed in the previous lecture.
- Open the Subversion Perspective in Eclipse for OSGi.
- Check out the Simple Sample from OSGi Course Repository
- Run the sample and change it.
- Define the main steps involved in developing OSGi applications.
- Write a small tutorial (main steps) about using Eclipse to develop OSGi applications.
Start the lab activities in the order defined below:
- Check out the Service Interface
- Check out the Service Provider
- Check out the Service Consumer
Steps for Building Bundels
1. Study the Interfaces
2. Define the Bundle that provide the service (Provider Bundle)
2.1 Define the Java Interface that exposes the services
Let us suppose that you want to define a service that allows the user to find a book from the book isbn. Then the interface should look similare with this one:
package cs.ecl.osgi.simple.bookfinder;
public interface BookFinder {
Book findBook(int isbn) throws BookNotFoundException;
}