-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[kodi] Thing handler factory with null annotations and constructor injection #8075
Conversation
…jection Signed-off-by: Laurent Garnier <[email protected]>
Travis tests were successfulHey @lolodomo, |
Signed-off-by: Laurent Garnier <[email protected]>
Travis tests were successfulHey @lolodomo, |
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. Nice little improvement.
this.networkAddressService = networkAddressService; | ||
this.stateDescriptionProvider = stateDescriptionProvider; | ||
this.webSocketClient = webSocketFactory.getCommonWebSocketClient(); | ||
} | ||
|
||
@Override | ||
protected void activate(ComponentContext componentContext) { |
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.
Please add @Activate
annotation here too. Otherwise this method will be ignored in favor of all annotated activation methods.
Another option would be to pass the ComponentContext
parameter to the constructor and move all the logic inside this method into the constructor too.
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.
Excuse me but I have a serious doubt. Please look at the handler factory for the Sonos and LGwebOS bindings for example. They are done like that. If activate
method was not called, the LGwebOS binding would just not work at all a(s the WebSocket client would not be started).
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.
Hm, interesting. I do not have a clue why it is working but it seems to work.
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: CSchlipp <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: MPH80 <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
…jection (openhab#8075) * [kodi] Thing handler factory with null annotations and constructor injection Signed-off-by: Laurent Garnier <[email protected]>
Signed-off-by: Laurent Garnier [email protected]