public class MqttWill extends Object
Constructor and Description |
---|
MqttWill(boolean isWillFlag,
String willTopic,
Buffer willMessage,
int willQos,
boolean isWillRetain,
MqttProperties willProperties)
Constructor
|
MqttWill(JsonObject json)
Create instance from JSON
|
Modifier and Type | Method and Description |
---|---|
Buffer |
getWillMessage() |
byte[] |
getWillMessageBytes() |
MqttProperties |
getWillProperties() |
int |
getWillQos() |
String |
getWillTopic() |
boolean |
isWillFlag() |
boolean |
isWillRetain() |
static MqttProperties |
propertiesFromJson(JsonArray array) |
static JsonArray |
propertiesToJson(MqttProperties properties) |
static MqttProperties.MqttProperty<?> |
propertyFromJson(JsonObject obj) |
static JsonObject |
propertyToJson(MqttProperties.MqttProperty<?> prop) |
JsonObject |
toJson()
Convert instance in JSON
|
public MqttWill(boolean isWillFlag, String willTopic, Buffer willMessage, int willQos, boolean isWillRetain, MqttProperties willProperties)
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 messagepublic MqttWill(JsonObject json)
json
- the JSONpublic boolean isWillFlag()
public String getWillTopic()
public Buffer getWillMessage()
public byte[] getWillMessageBytes()
public int getWillQos()
public boolean isWillRetain()
public MqttProperties getWillProperties()
public JsonObject toJson()
public static JsonArray propertiesToJson(MqttProperties properties)
public static JsonObject propertyToJson(MqttProperties.MqttProperty<?> prop)
public static MqttProperties propertiesFromJson(JsonArray array)
public static MqttProperties.MqttProperty<?> propertyFromJson(JsonObject obj)
Copyright © 2024 Eclipse. All rights reserved.