...
- The Greeter Interface bundle
- The Greeter Service Implementation bundle
- The Greeter Service Consumer bundle
The Greeter Interface bundle exports theGreeterService
interface which both other bundles depend on. This is the interface:
TheCode Block java java public interface GreeterService { Map<GreetingPhrase, String> greetMe(String name) throws GreeterException; }
GreetingPhase
andGreeterException
classes are also defined by this bundle.
In this walkthrough, the following setup will be used:
The client side bundles will be running in Equinox, invoking on a Distributed OSGi Service running in Felix. Note that the choice of containers is completely trivial. Any OSGi container that implements the Service Registry Hooks (a new feature in OSGi 4.2) can be used on either side.
The Server Side
The Greeter Service bundle provides a trivial implementation of the GreeterService interface. Additionally, it has an Activator:
...