public class MqttWill extends Object
Constructor and Description |
---|
MqttWill(boolean isWillFlag,
String willTopic,
byte[] willMessage,
int willQos,
boolean isWillRetain)
Constructor
|
MqttWill(JsonObject json)
Create instance from JSON
|
Modifier and Type | Method and Description |
---|---|
String |
getWillMessage()
Deprecated.
use
getWillMessageBytes() instead |
byte[] |
getWillMessageBytes() |
int |
getWillQos() |
String |
getWillTopic() |
boolean |
isWillFlag() |
boolean |
isWillRetain() |
JsonObject |
toJson()
Convert instance in JSON
|
String |
willMessage()
Deprecated.
use
getWillMessageBytes() instead |
int |
willQos()
Deprecated.
use
willQos() instead |
String |
willTopic()
Deprecated.
use
getWillTopic() instead |
public MqttWill(boolean isWillFlag, String willTopic, byte[] willMessage, int willQos, boolean isWillRetain)
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 retainedpublic MqttWill(JsonObject json)
json
- the JSONpublic boolean isWillFlag()
public String getWillTopic()
@Deprecated public String getWillMessage()
getWillMessageBytes()
insteadpublic byte[] getWillMessageBytes()
public int getWillQos()
public boolean isWillRetain()
@Deprecated public String willTopic()
getWillTopic()
instead@Deprecated public String willMessage()
getWillMessageBytes()
instead@Deprecated public int willQos()
willQos()
insteadpublic JsonObject toJson()
Copyright © 2023 Eclipse. All rights reserved.