felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Moloney <t.molo...@verizon.net>
Subject Re: Event-driven whiteboard pattern?
Date Sun, 29 Apr 2007 05:33:06 GMT
Niclas Hedhman wrote:
> On Sunday 29 April 2007 10:12, Tim Moloney wrote:
>   
>> Am I missing something obvious or should I just stick with the listener
>> pattern?
>>     
>
> uuuuuhhh... White-Board pattern is about the registration (of the listeners), 
> and doesn't concern itself with what it is used for.
>
> So, instead of;
>
>  MyService service = doSomeLookupAndDealWithDynamism( MyService.class );
>  service.addZoutListener( listener );
>
> you would do;
>
>  bundleContext.registerService( ZoutListener.class, listener, null );
>
>
> Cheers
> Niclas
>   

Then the event source could have a ZoutListener ServiceTracker and send 
the event to all the currently registered ZoutListeners.

I was confusing myself.  I new that I must have been missing the obvious.

Thanks,
  Tim


Mime
View raw message