Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » Thing Added/Removed notification
Thing Added/Removed notification [message #1755404] Fri, 03 March 2017 03:05 Go to next message
Tim Roberts is currently offline Tim RobertsFriend
Messages: 29
Registered: September 2016
Junior Member
If I have a bridge handler - is there a way to be notified when child things are added/removed?

I know there is a thingRegistry.addRegistryChangeListener - but that doesn't appear to be a public api method (Access Restriction...is not API).

What's the correct way of doing this (or do I just turn off that warning and use it anyway)?
Re: Thing Added/Removed notification [message #1755414 is a reply to message #1755404] Fri, 03 March 2017 07:46 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 661
Registered: December 2011
Senior Member
You should not care to much about child things themselves, usually you want to know as soon as there is a handler instance up and running (which automatically happens if new child things are created anyway).

And you are informed about initialized and disposed handlers, see BridgeHandler.childHandlerInitialized() and BridgeHandler.childHandlerDisposed().
Re: Thing Added/Removed notification [message #1755449 is a reply to message #1755414] Fri, 03 March 2017 12:42 Go to previous messageGo to next message
Tim Roberts is currently offline Tim RobertsFriend
Messages: 29
Registered: September 2016
Junior Member
That's exactly what I needed - thanks!

Side question - I have a bridge channel that can potentially include information from a child thing channel - is it possible for the bridge to listen for state update notifications from a child?
Re: Thing Added/Removed notification [message #1755470 is a reply to message #1755449] Fri, 03 March 2017 14:53 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 661
Registered: December 2011
Senior Member
Not directly, but as the bridge handler receives the child handler, it has a change to register itself as a listener (with some custom interface specific to your binding) on it.
Re: Thing Added/Removed notification [message #1755493 is a reply to message #1755470] Fri, 03 March 2017 19:27 Go to previous message
Tim Roberts is currently offline Tim RobertsFriend
Messages: 29
Registered: September 2016
Junior Member
Yep - that's the approach I took actually. Thanks
Previous Topic:How to Pre-populate "Location Field" for Thing in Paper UI's autodiscover Inbox
Next Topic:[solved]WhowTo make Translation files being used?
Goto Forum:
  


Current Time: Mon Nov 19 08:56:03 GMT 2018

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

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

Back to the top