Book Image

Mastering Eclipse Plug-in Development

By : Alex Blewitt, Bandlem Limited
Book Image

Mastering Eclipse Plug-in Development

By: Alex Blewitt, Bandlem Limited

Overview of this book

Table of Contents (18 chapters)
Mastering Eclipse Plug-in Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Plugging in to JFace and the Common Navigator Framework
Index

Dynamic services


The OSGi specification defines the following four different layers:

  • Security Layer: All actions are checked against a security permissions model

  • Module Layer: Modules are specified as bundles that have dependencies

  • Life Cycle Layer: Bundles that come and go

  • Service Layer: Dynamic services that come and go

The services layer allows bundles to communicate by defining an API that can cross bundle layers. However, the services layer also allows the services to come and go dynamically, instead of being fixed at runtime.

This mechanism allows services to be exported over a network, and since the network can come and go (as can the remote endpoint), the OSGi services layer can replicate that same functionality.

Responding to services that dynamically come and go may add a slight difficulty to the client code, but it will be more robust in case of failure. The next sections will present different ways to achieve dynamism in services.

Resolving services each time

The easiest way of working...