-
Notifications
You must be signed in to change notification settings - Fork 407
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
Backport: error handling for unexpected error in DefaultRegistrationEngin (modified) #945
Conversation
Too many "deprecation" will be hidden, we should probably live with some warning about backward compatibility.
Signed-off-by: moznion <[email protected]>
@moznion does it look good to you ? |
@sbernard31 Looks good to me. Thank you for doing this! |
Ok I will integrate this in |
Perfect ✨ Many thanks for your supporting! |
And make a suggestion to use interfaces that are in the `core` package. Signed-off-by: moznion <[email protected]> Also-by: Simon Bernard <[email protected]>
To call each interface method on corresponded `LwM2mObjectTree` method. Signed-off-by: moznion <[email protected]>
And call each interface's method at related method of `LeshanClient`; i.e. `start()`, `stop()` and `destroy()`. Signed-off-by: moznion <[email protected]>
This interface extends `LwM2mClientObserver` interface. And make `LwM2mClientObserverAdapter` and `LwM2mClientObserverDispatcher` implement that new interface. This doesn't break the backward compatibility because `LwM2mClientObserver2` is compatible with `LwM2mClientObserver` and each implementing class conceals the difference between `LwM2mClientObserver` and `LwM2mClientObserver2`. Signed-off-by: moznion <[email protected]>
If a task that are belong to `DefaultRegistrationEngine` raises unexpected `RuntimeException` and the `observer` member variable implements `LwM2mClientObserver2` (instead of `LwM2mClientObserver`), it calls `LwM2mClientObserver2#onUnexpectedError()` hook. The purpose of this hook gimmick is to shutdown the client application mainly. Signed-off-by: moznion <[email protected]>
Signed-off-by: moznion <[email protected]> Also-by: Simon Bernard <[email protected]>
3796236
to
6596442
Compare
Thx to you for the contribution. Could I ask how you are currently using Leshan ? |
Yeah, it's not rushing. There is no problem for the release schedule.
Yes, we are using Leshan (I appreciate this project!). Shall I let you know that at #830 ? |
That would be great :) |
(oh just in case you missed this, there are nightly build released on eclipse maven repository, so a release 1.3.0-SNAPSHOT is already available look at README for more details) |
Thank you for the information :) |
@moznion, thx for adding a comment on #830 🙏 |
@sbernard31 Yes, please 🙏 |
@moznion v1.3.0 is out : https://github.com/eclipse/leshan/releases/tag/leshan-1.3.0 |
🎉 |
This is just a little bit modified version of #944