-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for mqtt 5 and improve configuration property
- Loading branch information
Showing
17 changed files
with
608 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 24 additions & 1 deletion
25
src/main/kotlin/de/smartsquare/starter/mqtt/MqttClientConfigurer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
package de.smartsquare.starter.mqtt | ||
|
||
import com.hivemq.client.mqtt.mqtt3.Mqtt3ClientBuilder | ||
import com.hivemq.client.mqtt.mqtt5.Mqtt5ClientBuilder | ||
|
||
interface MqttClientConfigurer { | ||
/** | ||
* Interface to enable more advanced configuration for the [Mqtt3ClientBuilder] than what is possible with the | ||
* properties. | ||
*/ | ||
interface Mqtt3ClientConfigurer { | ||
|
||
/** | ||
* To be implemented by consumers. Can perform any configuration on the given [builder] in place. | ||
* This is called after all other configuration have been done so this is the final step. | ||
*/ | ||
fun configure(builder: Mqtt3ClientBuilder) | ||
} | ||
|
||
/** | ||
* Interface to enable more advanced configuration for the [Mqtt5ClientBuilder] than what is possible with the | ||
* properties. | ||
*/ | ||
interface Mqtt5ClientConfigurer { | ||
|
||
/** | ||
* To be implemented by consumers. Can perform any configuration on the given [builder] in place. | ||
* This is called after all other configuration have been done so this is the final step. | ||
*/ | ||
fun configure(builder: Mqtt5ClientBuilder) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.