Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cosmos-dev] SDD Eventing and the OSGi Whiteboard Pattern...

As a follow-up to my post yesterday about SDD classloading and service registration, I’d like to also suggest that OSGi could be leveraged to handle eventing and feedback using the Whiteboard pattern.

 

“The whiteboard pattern leverages the OSGi framework’s service registry instead of implementing a private registry as required by the listener pattern. Instead of having event listeners track event sources and then register themselves with the event source, the whiteboard pattern has event listeners register themselves as a service with the OSGi framework. When the event source has an event object to deliver, the event source calls all event listeners in the service registry.

 

Remarkably, the event source is not registered with the framework as a service. This makes bundles using the whiteboard pattern significantly smaller and easier to implement. The inter-bundle dependency between the event source and the event listener is handled by the framework and requires almost no code in the event source and event listener bundles.”

 

                                -from http://www.osgi.org/wiki/uploads/Links/whiteboard.pdf

 

-Brad

 

Bradley Beck
CA, Inc.
Sr Software Architect
Tel: +1-952-232-1720
Bradley.Beck@xxxxxx

 


Back to the top