-
Notifications
You must be signed in to change notification settings - Fork 881
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
Network module SPI #440
Network module SPI #440
Conversation
These files should be generated by the Eclipse Maven integration Signed-off-by: Maik Scheibler <eclipse@scheibler-family.de>
The usage of the Java Service Provider Interface enables the deployment of additional custom NetworkModules without modifications of the Paho code. Signed-off-by: Maik Scheibler <eclipse@scheibler-family.de>
4312c60
to
5b34f5a
Compare
Signed-off-by: Maik Scheibler <eclipse@scheibler-family.de>
I spent some time to understand the way the Paho client uses its NetworkModules and wrote an APIdoc based on my findings. If i misunderstood something or missed an important part, please let me know. |
Hi @mscheibler, Thank you for this contribution. It's definitely a nice way to refactor the older Network Module architecture and helpfully would resolve Enhancement #26 I think. The documentation and tests are a very welcome addition (We don't usually get those from contributors!). I'm going to pull your changes locally just to make sure that I fully understand how the SPI process works and once I'm happy I'll merge them in. |
Hi @jpwsutton |
The explicit classloader is necessary for Android to be able to find and load the declared NetworkModuleFactories Signed-off-by: Maik Scheibler <eclipse@scheibler-family.de>
Hi @jpwsutton |
Hello @jpwsutton |
Conflicts: org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttConnectOptions.java Signed-off-by: Maik Scheibler <eclipse@scheibler-family.de>
Signed-off-by: Maik Scheibler <eclipse@scheibler-family.de>
Conflicts: org.eclipse.paho.client.mqttv3.test/src/test/java/org/eclipse/paho/client/mqttv3/test/MqttConnectOptionsTest.java org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttAsyncClient.java
Hello @jpwsutton |
Hi @mscheibler, Sorry for the delay in getting this merged, I've finally had some time to sit down and go through it again, and am very glad to have merged it today. Thanks for all of your hard work! |
I like to enable the Paho Java Client to be extended by custom NetworkModules without introducing dependencies into the Paho Java client project.
So it will be possible to create my custom NetworkModule and still be able to use the Java Client from the Paho Project without the need to maintain a separate fork.
During the review i would really like to add some more documentation to the org.eclipse.paho.client.mqttv3.internal.NetworkModule interface. Especially about when / how often are the methods called. What are the consequences of the exceptions? How is the NetworkModule expected to behave on Exceptions, e.g. like who is triggering a reconnect?
Please make sure that the following boxes are checked before submitting your Pull Request, thank you!