-
Notifications
You must be signed in to change notification settings - Fork 40
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
Mqtt5 Adapter Binding #674
Conversation
…java into mqtt5to3adapter
src/main/java/software/amazon/awssdk/crt/mqtt/MqttClientConnection.java
Outdated
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5Client.java
Outdated
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5Client.java
Outdated
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5ClientOptions.java
Outdated
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5ClientOptions.java
Outdated
Show resolved
Hide resolved
* | ||
* @return a MqttClientConnection | ||
*/ | ||
public MqttClientConnection NewConnection(MqttClientConnectionEvents callbacks) throws MqttException |
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.
I wish these were not public and instead there was a constructor in MqttConnection that took a 5 client and used package-private functionality to construct the config and make the native call.
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.
Added a constructor in MqttConnection. However, as MqttConnection and Mqtt5Client is not in the same package, it is not possible to use a package-private config, instead I add a getClientOptions
for Mqtt5Client so that the MqttConnection could access the config.
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.
Also, after thinking about it. This is a better workflow as it reduced the chance that the Mqtt5Client user to access the Mqtt3 interface. I will also update it for CPP and Python.
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5Client.java
Outdated
Show resolved
Hide resolved
…java into mqtt5to3adapter
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.