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

Design patterns


A design pattern is a reusable element of software architecture that can be applied to different situations. This section presents the two most common OSGi-specific patterns: whiteboard and extender.

The whiteboard pattern

The OSGi whiteboard pattern is one in which updates are communicated by bundles to a central location. This approach can be compared to that of a shared whiteboard where someone updates an entry on the whiteboard and others can come and have a look at it, without needing any direct connection or coupling between them, as illustrated in the following diagram:

Provided that the individual has a reference to the shared whiteboard, they can add notes to it. This allows others to pick up the message without having any direct relationship with the individual who created it:

The OSGi Service Registry and OSGi Event Admin (covered in Chapter 8, Event-driven Applications with EventAdmin) are both examples of the whiteboard pattern. Here, bundles talk to the shared service...