Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 202278

Summary: [eventadmin] Remove event adapters
Product: [Eclipse Project] Equinox Reporter: John Arthorne <john.arthorne>
Component: CompendiumAssignee: Chris Aniszczyk <caniszczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Pavlin.Dobrev, tjwatson
Version: 3.3   
Target Milestone: 3.4 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 209293, 209294, 209344    
Attachments:
Description Flags
org.eclipse.equinox.event.patch
none
org.eclipse.equinox.event.patch
none
patch none

Description John Arthorne CLA 2007-09-05 10:34:39 EDT
org.eclipse.equinox.event has dependencies on various other OSGi bits such as user admin, wire admin, and UPnP. These dependencies exist in order to provide adapters from other event APIs to the event admin API.  However, it is not the responsibility of event admin to provide these adapters, so they should be moved to the respective services that expose the events being adapted. See bug 184021 comment 8.
Comment 1 Chris Aniszczyk CLA 2007-11-07 20:52:22 EST
true
Comment 2 Thomas Watson CLA 2007-11-08 10:58:55 EST
I think this is a good idea (well it is actually required by the spec now :).

But I would like to point out my comment from bug 184021 comment 12:

To be clear, the current EventAdmin impl only depends on the service interfaces
being installed.  These are provided by the org.eclipse.osgi.services bundle. 
The actual implementations are not required to be installed.  They will be used
only if the service is present in the OSGi service registry.
Comment 3 Chris Aniszczyk CLA 2007-11-08 22:35:54 EST
Created attachment 82511 [details]
org.eclipse.equinox.event.patch

I removed the unnecessary adapters from EventAdmin and while I was at it, I refactored things to comply a bit with how things are done with Eclipse. I also renamed EventRedeliverer to EventCourier.

I also ran the OSGi TCK on EventAdmin and it passes.

I will open bugs against CM and UserAdmin to move the event adapters.
Comment 4 Thomas Watson CLA 2007-11-09 09:03:48 EST
Also need bugs for the LogService impl and WireAdmin impl.

Pavlin, can you tell us if the wire admin impl in the incubator properly posts events to EventAdmin the service is available?
Comment 5 Pavlin Dobrev CLA 2007-11-09 09:19:52 EST
(In reply to comment #4)
> Also need bugs for the LogService impl and WireAdmin impl.
> Pavlin, can you tell us if the wire admin impl in the incubator properly posts
> events to EventAdmin the service is available?

yes - implemented in class org.eclipse.equinox.wireadmin.internal.WireReDispatcher
Comment 6 Chris Aniszczyk CLA 2007-11-09 10:27:53 EST
Filed a bug for useradmin, log, and cm... no need for wireadmin

They all depend on this bug.
Comment 7 Chris Aniszczyk CLA 2007-11-09 16:51:48 EST
Created attachment 82578 [details]
org.eclipse.equinox.event.patch

This patch simply removes the event adapters. There's no refactoring here.
Comment 8 Thomas Watson CLA 2007-11-12 15:55:31 EST
Created attachment 82702 [details]
patch

also need to remove LogReader* classes.
Comment 9 Thomas Watson CLA 2007-11-12 16:03:38 EST
patch released for M4.