689929ff8b
Motivation: The CONNACK message builder `ConnAckBuilder` doesn't provide a smooth way to assign the message properties. This PR try to provide an simpler way to create them, in a lazy way. Modification: This PR permit to store properties in the ConnAck message, collecting them and inserting during the build phase. The syntax this PR introduces is: ```java MqttMessageBuilders.connAck().properties(new MqttMessageBuilders.PropertiesInitializer<MqttMessageBuilders.ConnAckPropertiesBuilder>() { @Override public void apply(MqttMessageBuilders.ConnAckPropertiesBuilder builder) { builder.assignedClientId("client1234"); builder.userProperty("custom_property", "value"); } }).build() ``` The name of the properties are defined in the `ConnAckPropertiesBuilder` so that is can be easily used by autocompletion tools. Result: This PR adds the builder class `ConnAckPropertiesBuilder`which is used by newly introduced method `properties` inside the message builder class `ConnAckBuilder`. |
||
---|---|---|
.. | ||
src | ||
pom.xml |