-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ThingHandlerService to an OSGi component prototype #3957
Conversation
Thanks for picking it up! It looks good to me so far. 👍 |
Signed-off-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
Signed-off-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
8812da3
to
7a3dd91
Compare
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
@wborn @kaikreuzer I would like to see this merged "soon", because the corresponding PR in openhab-addons will create a lot of merge conflicts each time something is changed in a discovery service. I'll now create a PR for the documentation how to do thing discovery right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up! Lgtm as far as I can tell.
I leave it to @wborn to have another look and merge it, if he is happy with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for these few minor comments:
...ry/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java
Outdated
Show resolved
Hide resolved
...openhab.core.thing/src/main/java/org/openhab/core/thing/binding/BaseThingHandlerFactory.java
Outdated
Show resolved
Hide resolved
...openhab.core.thing/src/main/java/org/openhab/core/thing/binding/BaseThingHandlerFactory.java
Outdated
Show resolved
Hide resolved
...openhab.core.thing/src/main/java/org/openhab/core/thing/binding/BaseThingHandlerFactory.java
Outdated
Show resolved
Hide resolved
...openhab.core.thing/src/main/java/org/openhab/core/thing/binding/BaseThingHandlerFactory.java
Outdated
Show resolved
Hide resolved
…enhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: J-N-K <github@klug.nrw>
…enhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: J-N-K <github@klug.nrw>
…enhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: J-N-K <github@klug.nrw>
…enhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: J-N-K <github@klug.nrw>
…enhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: J-N-K <github@klug.nrw>
…enhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: J-N-K <github@klug.nrw>
…thing/binding/BaseThingHandlerFactory.java Co-authored-by: Wouter Born <github@maindrain.net> Signed-off-by: J-N-K <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Related to: openhab/openhab-core#3957 Signed-off-by: Jan N. Klug <github@klug.nrw>
Thank you @J-N-K , I will adjust the openweathermap binding to take benefit of this new feature. Just one question: what will happen for non official bindings already using ThingHandlerService, will they be broken ? |
They need to be adjusted accordingly. |
So something to clearly announce when releasing version 4.2... |
Related to: openhab/openhab-core#3957 Signed-off-by: Jan N. Klug <github@klug.nrw>
Caused by openhab#3957 Signed-off-by: Wouter Born <github@maindrain.net>
Caused by #3957 Signed-off-by: Wouter Born <github@maindrain.net>
…3957) Also-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com> Signed-off-by: J-N-K <github@klug.nrw> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Caused by openhab#3957 Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Related to: openhab/openhab-core#3957 Signed-off-by: Jan N. Klug <github@klug.nrw> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Related to: openhab/openhab-core#3957 Signed-off-by: Jan N. Klug <github@klug.nrw>
Supersedes #1941
Since Connor is no longer available I decided to pick up the PR and enhance it. A very good example why we should go this way is openhab/openhab-addons#16037. It implements a
TheKeyTranslationProvider.java
just to pass it from the handler factory to the thing handler and then to theThinghandlerService
for localization of the discovery results. There is already similar code in the repository. This is only necessary because we can't inject OSGi services directly to the discovery services.I started with two implementations in openhab-addons (openhab/openhab-addons#16107) and would like to hear comments from @openhab/core-maintainers before I start a bigger refactoring in openhab-addons.