Skip to content

java: add error callbacks #316

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

Closed

Conversation

mathieu1fb
Copy link
Collaborator

Feature

Error callbacks allow the host applications to be notified when the SDK encounters unexpected errors.

Closes #315


How to test

  1. Clone the its-client project on your IDE.
  2. Ensure that you have Gradle to be able to build the java/iot3 modules (core, mobility and examples).
  3. Find the Iot3CoreExample and Iot3MobilityExample classes in the examples module.
  4. Run them without changing the placeholder parameters.

Expected results:

On the console, you should see the following for Iot3CoreExample:

IoT3Core error: java.net.UnknownHostException: mqtt_host: Temporary failure in name resolution

And the following for Iot3MobilityExample:

IoT3Mobility error: java.net.UnknownHostException: mqtt_host: Temporary failure in name resolution
IoT3Mobility error: MQTT client is not connected.
...
IoT3Mobility error: MQTT client is not connected.

This callback allows the host application to react upon errors like connection failures.

Signed-off-by: Mathieu LEFEBVRE <[email protected]>
This callback allows the host application to react upon errors like IoT3Core component failures (e.g. MQTT connection failure).

Signed-off-by: Mathieu LEFEBVRE <[email protected]>
@mathieu1fb mathieu1fb added this to the Sprint 8 milestone Mar 12, 2025
@mathieu1fb mathieu1fb self-assigned this Mar 12, 2025
@mathieu1fb
Copy link
Collaborator Author

Eventually not needed for now, might reopen it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add error callbacks
1 participant