Skip to content
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

Merged
merged 8 commits into from
Dec 10, 2020

Conversation

sbernard31
Copy link
Contributor

This is just a little bit modified version of #944

sbernard31 and others added 2 commits December 9, 2020 15:03
Too many "deprecation" will be hidden, we should probably live with some
warning about backward compatibility.
@sbernard31
Copy link
Contributor Author

@moznion does it look good to you ?

@moznion
Copy link
Contributor

moznion commented Dec 10, 2020

@sbernard31 Looks good to me. Thank you for doing this!

@sbernard31
Copy link
Contributor Author

Ok I will integrate this in 1.x
Is there something else you wanted to add in a 1.3.0 version ?
Once this will be merged do you want to play this the branch 1.x to see if there is any issue before I release the 1.3.0 ?

@moznion
Copy link
Contributor

moznion commented Dec 10, 2020

Perfect ✨
That’s all of my wanted feature. I’m looking forward to see version 1.3.

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]>
@sbernard31
Copy link
Contributor Author

Thx to you for the contribution.

Could I ask how you are currently using Leshan ?
If I do the release begin of the next week is it OK to you ?

@moznion
Copy link
Contributor

moznion commented Dec 10, 2020

Yeah, it's not rushing. There is no problem for the release schedule.

Could I ask how you are currently using Leshan ?

Yes, we are using Leshan (I appreciate this project!). Shall I let you know that at #830 ?

@sbernard31
Copy link
Contributor Author

Shall I let you know that at #830 ?

That would be great :)

@sbernard31
Copy link
Contributor Author

(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)

@moznion
Copy link
Contributor

moznion commented Dec 11, 2020

Thank you for the information :)

@sbernard31
Copy link
Contributor Author

@moznion, thx for adding a comment on #830 🙏
Could I also add your company as Leshan adopters : https://iot.eclipse.org/adopters/#iot.leshan ?

@moznion
Copy link
Contributor

moznion commented Dec 11, 2020

@sbernard31 Yes, please 🙏

@sbernard31
Copy link
Contributor Author

@moznion
Copy link
Contributor

moznion commented Dec 14, 2020

🎉
I appreciate your hard work, @sbernard31 !!

@sbernard31 sbernard31 deleted the client_unexpected_error branch January 26, 2021 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants