Changes

Jump to: navigation, search

OSGi : Develop Simple Apps

131 bytes added, 22:32, 22 January 2011
no edit summary
* [http://www.osgi.org/javadoc/r4v42/org/osgi/framework/BundleActivator.html BundleActivator]
<h4>2. Define the Bundle Service ProviderInterface</h4><h5> 2.1 Define the Generic Bundle Service Provider</h5>
<h5>2.1.1 Define the Java Interface that exposes the services</h5>Let us suppose that you want one wants to define a service that allows the user to find a book from the book using its isbn. Then the interface should look similare with this one:
<source lang="java">
package cs.ecl.osgi.simple.bookfinder;
<h5>2.2 Define in the MANIFEST.MF that cs.ecl.osgi.simple.bookfinder is the '''Exported-Package'''</h5>
<source lang="xml">
Manifest-Version: 1.0
</source>
<h5h4>23.2 Define a Concrete the Bundle Service Provider</h5h4>The service ''bookfinder'' could be used only if one implements the service. The bundle cs.ecl.osgi.simple.bookfinderservice implements ''BundleActivator'' interface in the ''Activator'' class <h6h5>2.23.1 Define the Activator class</h6h5>
<source lang="java">
package cs.ecl.osgi.simple.bookfinderservice;
</source>
<h6h5>23.2.1 Define the internal implementation class (the class BookFinderImplementation in an internal package ''cs.ecl.osgi.simple.bookfinderservice.internals'' <u>The package will not be exposed to the outside world</u>)</h6h5>
<source lang="java">

Navigation menu