Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Automation : how to access ModuleHandler(s)?
Automation : how to access ModuleHandler(s)? [message #1719767] Mon, 11 January 2016 21:29 Go to next message
Karel Goderis is currently offline Karel GoderisFriend
Messages: 198
Registered: March 2014
Senior Member
I am listing to RuleAddedEvents, and based on what I get I dissect the Rule that is added for some additional info.

In my case this yields me a reference to a Trigger, but I would like to get access to the TriggerHandler that is behind this Trigger. This seems not to be possible at all, and hence, my question is : does all information about a Trigger have to go through the Configuration of that trigger (since that is part of the payload of the Event)?

There might be some cases where TriggerHandlers do some funky stuff, store things and so forth, that one would like to use later on, but that are definitely not part of the initial Configuration of the Trigger (I write Trigger, but this could be any Module of course). This kind of behaviour is/was not intended in the Automation architecture? Are TriggerHandlers supposed to write any data back to the Configuration of the Trigger itself (e.g. SetConfiguration())?

Tx
Karel
Re: Automation : how to access ModuleHandler(s)? [message #1719915 is a reply to message #1719767] Wed, 13 January 2016 07:13 Go to previous message
Yordan Mihaylov is currently offline Yordan MihaylovFriend
Messages: 10
Registered: January 2016
Junior Member
Hi, the ModuleHandler is a SPI interface (service provider interface) and it is intended only for ModuleType creators and RuleEngine itself. It contains implementation of logic of module type and must not be used by application developers which uses rule engine. Otherwise any developer can change behavior of the module type and this will be applied to all rules , which uses the module type, in the rule engine. And this will reflect to all users of rule engine.
The public info of the rule is included into RuleAddedEvent and it is intended for users of rule engine.
Previous Topic:How do I build so I can test the UI
Next Topic:UI questions
Goto Forum:
  


Current Time: Fri Apr 19 22:03:20 GMT 2024

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

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

Back to the top