public class MqttPingReq extends MqttWireMessage
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY |
duplicate, MESSAGE_TYPE_CONNACK, MESSAGE_TYPE_CONNECT, MESSAGE_TYPE_DISCONNECT, MESSAGE_TYPE_PINGREQ, MESSAGE_TYPE_PINGRESP, MESSAGE_TYPE_PUBACK, MESSAGE_TYPE_PUBCOMP, MESSAGE_TYPE_PUBLISH, MESSAGE_TYPE_PUBREC, MESSAGE_TYPE_PUBREL, MESSAGE_TYPE_SUBACK, MESSAGE_TYPE_SUBSCRIBE, MESSAGE_TYPE_UNSUBACK, MESSAGE_TYPE_UNSUBSCRIBE, msgId, STRING_ENCODING| Constructor and Description |
|---|
MqttPingReq() |
MqttPingReq(byte info,
byte[] variableHeader) |
| Modifier and Type | Method and Description |
|---|---|
String |
getKey()
Returns a key associated with the message.
|
protected byte |
getMessageInfo()
Sub-classes should override this to encode the message info.
|
protected byte[] |
getVariableHeader() |
boolean |
isMessageIdRequired()
Returns
false as message IDs are not required for MQTT
PINGREQ messages. |
createWireMessage, createWireMessage, decodeUTF8, encodeMBI, encodeMessageId, encodeUTF8, getHeader, getMessageId, getPayload, getType, isRetryable, readMBI, setDuplicate, setMessageId, toStringpublic static final String KEY
public MqttPingReq()
public MqttPingReq(byte info,
byte[] variableHeader)
throws IOException
IOExceptionpublic boolean isMessageIdRequired()
false as message IDs are not required for MQTT
PINGREQ messages.isMessageIdRequired in class MqttWireMessageprotected byte[] getVariableHeader()
throws MqttException
getVariableHeader in class MqttWireMessageMqttExceptionprotected byte getMessageInfo()
MqttWireMessagegetMessageInfo in class MqttWireMessagepublic String getKey()
MqttWireMessagegetKey in class MqttWireMessageCopyright © 2017 Eclipse Paho. All Rights Reserved.