public class MqttSubscribe extends MqttWireMessage
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 |
|---|
MqttSubscribe(byte info,
byte[] data)
Constructor for an on the wire MQTT subscribe message
|
MqttSubscribe(String[] names,
int[] qos)
Constructor for an on the wire MQTT subscribe message
|
| Modifier and Type | Method and Description |
|---|---|
protected byte |
getMessageInfo()
Sub-classes should override this to encode the message info.
|
byte[] |
getPayload()
Sub-classes should override this method to supply the payload bytes.
|
protected byte[] |
getVariableHeader() |
boolean |
isRetryable() |
String |
toString() |
createWireMessage, createWireMessage, decodeUTF8, encodeMBI, encodeMessageId, encodeUTF8, getHeader, getKey, getMessageId, getType, isMessageIdRequired, readMBI, setDuplicate, setMessageIdpublic MqttSubscribe(byte info,
byte[] data)
throws IOException
info - data - IOExceptionpublic MqttSubscribe(String[] names, int[] qos)
names - - one or more topics to subscribe toqos - - the max QoS that each each topic will be subscribed atpublic String toString()
toString in class MqttWireMessageprotected byte getMessageInfo()
MqttWireMessagegetMessageInfo in class MqttWireMessageprotected byte[] getVariableHeader()
throws MqttException
getVariableHeader in class MqttWireMessageMqttExceptionpublic byte[] getPayload()
throws MqttException
MqttWireMessagegetPayload in class MqttWireMessageMqttExceptionpublic boolean isRetryable()
isRetryable in class MqttWireMessageCopyright © 2017 Eclipse Paho. All Rights Reserved.