Chapter 4. In-depth look at bundles and services

 

This chapter covers
  • Keeping bundle packages private to decrease exposure
  • Making bundle packages optional to improve flexibility
  • The wiring API
  • Understanding class loading in a bundle
  • Advanced use of service filtering
  • Service prioritization
  • Service factories
  • Unit testing and integration testing for robustness

 

In chapter 3, we developed our first OSGi-based application employing two important OSGi features: bundles and services. As you’ve seen, bundles allow you to modularize your code, which lends to better reuse of code. Likewise, services improve the decoupling between the bundles, which yields a more resilient and flexible system architecture.

In this chapter we’ll take an in-depth look ...

Get OSGi in Depth now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.