Skip to main content



      Home
Home » Archived » Eclipse SmartHome » using ExtendedDiscoveryService with MDNSDiscoveryParticipant
using ExtendedDiscoveryService with MDNSDiscoveryParticipant [message #1776279] Tue, 14 November 2017 16:59 Go to next message
Eclipse UserFriend
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 02:45 Go to previous messageGo to next message
Eclipse UserFriend
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 04:58 Go to previous message
Eclipse UserFriend
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: Sun May 18 16:56:18 EDT 2025

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

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

Back to the top