...
This demo can be used with any DOSGi distribution, in this document the single-bundle distribution is used with the Equinox implementation of DS.
Demo design
This demo is quite similar to the Spring-DM demo and the Greeter demo in structure. It consists of 3 bundles:
- An interface bundle defining the Adder Service interface.
- An Adder Service implementation bundle.
- An Adder Service consumer bundle.
The service implementation and consumer bundle are built using DS.
@@@@ image
The Adder Service interface is as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
public interface AdderService {
int add(int a, int b);
} |
The Adder Service Implementation
The service implementation providers a simplistic implementation of the AdderService interface, which is instantiated as a DS component.