felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls" <karlpa...@gmail.com>
Subject Re: [jira] Created: (FELIX-68) UPnP and Event Admin
Date Fri, 05 May 2006 07:33:12 GMT
> > Hm, the problem I see with this is how do you know that a device that
> > reads the spec differently doesn't send its events to the event admin
> > too? Then we end-up with a situation where we have duplicated events.
> >
> Sure, but this is legacy since the
> org.osgi.service.upnp.UPnPEventListener exists before R4 and EventAdmin.

But how does this change things in this regard? The spec clearly
states that in R4 UPnPEvents must be available through the EA. It,
however, fails to mention who is responsible to do this. Moreover, it
is not exactly a legacy problem (it is now, but only because the R4
spec is vague) - all that would have been necessary to avoid it would
have been to be specific about who is doing the adaption.

> One more thing : an argument to add the UPnP to EA bridge inside the EA
> implementation may be an optimization
> in which the bridge is deactived when non EventHandler with
> (event.topics=org/osgi/service/upnp/UPnPEvent) is registered !
> A general-purpose dependency manager could be useful in this context !
> Isn't it Rick ;-)

Sure, that was my intention. I do the same with for example the
adaption of LogService entries to events. There is no hard dependency
on a LogService nor on the org.osgi.service.log package. As soon as a
LogService becomes available its entries are adapted until it goes
away again.

> More over, there is the same optimization for Framework-,
> Bundle-,Service-, and  Log-Events
> Karl, how do you tacckle that in your EA implementation ?

Yes, as I was saying, that is the reason why I find it a good idea to
put the UPnPEvent adaption in the EA too. As stated above, the EA has
a dynamic import header for the org.osgi.service.log package and
registers a service listener for LogReaders. As soon as such a service
becomes available adaption is started for it until the service goes
away. That way the EA has no hard dependency on any other bundle.

> Didier

O.k., let me propose the following, I integrate the bridge in the EA
and make it a configurable option. That way we provide the possibility
to adapt all UPnPEvents in case


if not then we don't. Additionally, I will ask at the osgi-dev list
whether there is any better approach we didn't see.




Karl Pauls

View raw message