Skip to main content



      Home
Home » Archived » Eclipse SmartHome » Thing Added/Removed notification
Thing Added/Removed notification [message #1755404] Thu, 02 March 2017 22:05 Go to next message
Eclipse UserFriend
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 02:46 Go to previous messageGo to next message
Eclipse UserFriend
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 07:42 Go to previous messageGo to next message
Eclipse UserFriend
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 09:53 Go to previous messageGo to next message
Eclipse UserFriend
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 14:27 Go to previous message
Eclipse UserFriend
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: Wed May 21 11:06:02 EDT 2025

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

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

Back to the top