Chapter 15. Declarative Services

As we have seen, the OSGi service mechanism greatly improves modularity and flexibility. But the programmatic API for registering and acquiring services is often challenging, as are the complexities of managing dynamic services. OSGi Release 4 introduced the Declarative Services (DS) specification to address these issues.

In Chapter 6, “Dynamic Services,” we introduced DS, and the subsequent chapters have assumed their use throughout Toast. This chapter presents a deep dive into the capabilities and use of the DS mechanism. In particular, we

• Recap the Declarative Services model and programming techniques

• Identify common usage scenarios for Declarative Services

• Discuss how to launch and debug an OSGi application ...

Get OSGi and Equinox 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.