Application-specific event notification [message #628666] |
Thu, 23 September 2010 15:16 |
Fabio M Messages: 25 Registered: July 2009 |
Junior Member |
|
|
Hi everybody,
I was wondering if the Eclipse platform provides a workbench-wide
service for handling the notification of application-specific events
(i.e., listeners registration and events firing).
For example, imagine a plugin that wants to notify views and editors
that a given event occurred (e.g., new articles downloaded, documents
deleted, new data source created, etc.) so that views and editors can
react accordingly (e.g., an editor closes when the corresponding
document is deleted).
What I am looking for is something that allows me to do this:
notificationService.addListener(eventType, target);
notificationService.fireEvent(eventType, eventData);
I guess that this is not available in the standard platform and clients
should provide their own implementation.
Am I missing anything?
Thanks,
-Fabio
|
|
|
Re: Application-specific event notification [message #628667 is a reply to message #628666] |
Thu, 23 September 2010 15:19 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
You are looking for the EventAdmin-Service of OSGi which is a MessageBus
Tom
Am 23.09.10 17:16, schrieb Fabio Mancinelli:
> Hi everybody,
>
> I was wondering if the Eclipse platform provides a workbench-wide
> service for handling the notification of application-specific events
> (i.e., listeners registration and events firing).
>
> For example, imagine a plugin that wants to notify views and editors
> that a given event occurred (e.g., new articles downloaded, documents
> deleted, new data source created, etc.) so that views and editors can
> react accordingly (e.g., an editor closes when the corresponding
> document is deleted).
>
> What I am looking for is something that allows me to do this:
>
> notificationService.addListener(eventType, target);
> notificationService.fireEvent(eventType, eventData);
>
> I guess that this is not available in the standard platform and clients
> should provide their own implementation.
>
> Am I missing anything?
>
> Thanks,
> -Fabio
>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02474 seconds