Class MqttWill
java.lang.Object
io.vertx.mqtt.MqttWill
Will information from the remote MQTT client
-
Constructor Summary
ConstructorsConstructorDescriptionMqttWill(boolean isWillFlag, String willTopic, Buffer willMessage, int willQos, boolean isWillRetain, MqttProperties willProperties) ConstructorMqttWill(JsonObject json) Create instance from JSON -
Method Summary
Modifier and TypeMethodDescriptionbyte[]intbooleanbooleanstatic MqttPropertiespropertiesFromJson(JsonArray array) static JsonArraypropertiesToJson(MqttProperties properties) static MqttProperties.MqttProperty<?> static JsonObjecttoJson()Convert instance in JSON
-
Constructor Details
-
MqttWill
public MqttWill(boolean isWillFlag, String willTopic, Buffer willMessage, int willQos, boolean isWillRetain, MqttProperties willProperties) Constructor- Parameters:
isWillFlag- indicates will message presencewillTopic- topic to publish the willwillMessage- payload of the willwillQos- qos level for the willisWillRetain- if the will message must be retainedwillProperties- MQTT properties of the last will message
-
MqttWill
-
-
Method Details
-
isWillFlag
public boolean isWillFlag()- Returns:
- the will flag for indicating the will message presence
-
getWillTopic
- Returns:
- the topic for the will as provided by the remote MQTT client
-
getWillMessage
- Returns:
- the payload for the will as provided by the remote MQTT client
-
getWillMessageBytes
public byte[] getWillMessageBytes()- Returns:
- the payload for the will as provided by the remote MQTT client
-
getWillQos
public int getWillQos()- Returns:
- the QoS level for the will as provided by the remote MQTT client
-
isWillRetain
public boolean isWillRetain()- Returns:
- true if the will must be retained as provided by the remote MQTT client
-
getWillProperties
- Returns:
- MQTT properties of the last will message
-
toJson
-
propertiesToJson
-
propertyToJson
-
propertiesFromJson
-
propertyFromJson
-