Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » using ExtendedDiscoveryService with MDNSDiscoveryParticipant
using ExtendedDiscoveryService with MDNSDiscoveryParticipant [message #1776279] Tue, 14 November 2017 21:59 Go to next message
Marcel Verpaalen is currently offline Marcel VerpaalenFriend
Messages: 59
Registered: September 2014
Member
Hi,

I'm trying to implement ExtendedDiscoveryService for a discovery based on MDNSDiscoveryParticipant.

Unfortunately setDiscoveryServiceCallback is never called, hence any use of discoveryServiceCallback.getExistingThing(thingUID) is giving a NPE.
If I try to extend AbstractDiscoveryService and use it, it is not working in combination with the MDNSDiscoveryParticipant.

Any suggestion on how to be able to use the combination?
Re: using ExtendedDiscoveryService with MDNSDiscoveryParticipant [message #1776300 is a reply to message #1776279] Wed, 15 November 2017 07:45 Go to previous messageGo to next message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
That's indeed right - it works only for DiscoveryService implementations currently (which in your case would be the MDSNDiscoveryService). The MDNSDiscoveryParticipants however only hook into them.

I don't see why this same mechanism couldn't be extend for participants also. It would mean that the MDSNDiscoveryService needs to implement the ExtendedDiscoveryService interface and in turn applies the same mechanism as the DiscoveryServiceRegistryImpl to any MDNSDiscoveryParticipant - i.e. if these also implement ExtendedDiscoveryService then it forwards the DiscoveryServiceCallback instance to them (and accordingly for UPnP, of course). It just gotta be done cleanly in terms of OSGi so it won't leak any stale instances.

Please file an issue on github for this enhancement - and preferably also a PR ;-)
Re: using ExtendedDiscoveryService with MDNSDiscoveryParticipant [message #1786433 is a reply to message #1776300] Thu, 03 May 2018 08:58 Go to previous message
Stefan Triller is currently offline Stefan TrillerFriend
Messages: 29
Registered: April 2017
Junior Member
Just for reference: I have created PR https://github.com/eclipse/smarthome/pull/5526 to implement this missing feature.
Previous Topic:Update to OSGi specifications 6.0
Next Topic:Process for an idea
Goto Forum:
  


Current Time: Mon Apr 29 00:22:50 GMT 2024

Powered by FUDForum. Page generated in 0.03398 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top