Whiteboard Pattern - Wikipedia

submited by
Style Pass
2023-09-19 16:00:11

Whiteboard Design Pattern is an OSGi service model, which influences the OSGi framework's service registry. Whiteboard pattern came into existence because of complicated and error prone nature of traditional model: The Listener Pattern (aka Observer Pattern).[1]

OSGi service model is a collaboration model which supports service registry. The service registry allows applications or bundles to register services, which are simple Java interfaces to implement different functionalities. The dynamic nature of the service registry is useful to track the services that can show up or leave at any time. Whiteboard Pattern is created to support such OSGi service model, which was not supported by Listener Pattern.[1][2]

The Listener Pattern is typically known as Observer Pattern. It is a Behavioral Pattern (aka Publish-Subscribe), which deals with dynamic changes in the state of different objects.

Listener Pattern follows a structure where an event listener is registered to event source. Now whenever an event source changes its state, all its event listeners get notified about the change through event object. In this pattern, everything is controlled by event source.

Leave a Comment