Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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

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 message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 49
Registered: January 2011
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 ;-)
Previous Topic:Nginx configuration to access ESH
Next Topic:JDBC persistence service in ESH
Goto Forum:

Current Time: Sat Mar 24 22:00:18 GMT 2018

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

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