ConnectorIO / connectorio-addons

Dedicated repository for openHAB software extensions maintained by ConnectorIO.
Apache License 2.0
18 stars 11 forks source link

Simplify chained profile implementation. #87

Closed splatch closed 1 month ago

splatch commented 1 month ago

Closes #85. Earlier implementation from 2021/2022 did rely on thread local. While collision at thread local were unlikely to spot, overall architecture of this component become fairly complex. In order to simplify and keep it in clean shape internal call flow have been redesigned to rely on local stack. Since all profiles are known before hand, we can use order of their creation as well as intention (callback method call), to determine direction in which we should navigate further. Once all callbacks are passed, a framework callback is called.