How to get all handlers for certain thingtype [message #1713111] |
Sat, 31 October 2015 12:16  |
Eclipse User |
|
|
|
I guess there is a simple, obvious way, but could not directly find it.
From my discovery service I need to inform all bridge handlers to refresh the results they provide to the discovery service, so the discovery service can submit them as discovery results.
Hence my though is that I would cycle through all the handlers for my thingtype and call the refresh().
Anyone suggestion on how to do this?
|
|
|
|
|
|
Re: How to get all handlers for certain thingtype [message #1713921 is a reply to message #1713798] |
Sun, 08 November 2015 08:07   |
Eclipse User |
|
|
|
Marcel,
I think the easiest way to solve your problem is indeed to follow what Kai suggested (e.g. DiscoveryResults), even if this implies you have some duplicate "discovery" code in both the BridgeHandler and the DiscoveryService. Also, I would refrain from have the Bridges talk to each other, you better make each one of them standalone. So, the DiscoveryService would discover devices, and the Bridges would do the same thing, maybe duplicating traffic and so forth. Partly deviating from this could be that you make your Bridges DiscoveryListeners, but then they will depend on the DiscoveryService to discover services, but maybe you do not want this.
Maybe not the most beautiful approach, but it will make your life far more easier
|
|
|
|
Powered by
FUDForum. Page generated in 0.05150 seconds