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, toString
public static final String KEY
public MqttPingReq()
public MqttPingReq(byte info, byte[] variableHeader) throws IOException
IOException
public boolean isMessageIdRequired()
false
as message IDs are not required for MQTT
PINGREQ messages.isMessageIdRequired
in class MqttWireMessage
protected byte[] getVariableHeader() throws MqttException
getVariableHeader
in class MqttWireMessage
MqttException
protected byte getMessageInfo()
MqttWireMessage
getMessageInfo
in class MqttWireMessage
public String getKey()
MqttWireMessage
getKey
in class MqttWireMessage
Copyright © 2019 Eclipse Paho. All rights reserved.