public class MqttConnect extends MqttWireMessage
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY |
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
Constructor and Description |
---|
MqttConnect(byte info,
byte[] data)
Constructor for an on the wire MQTT connect message
|
MqttConnect(java.lang.String clientId,
int MqttVersion,
boolean cleanSession,
int keepAliveInterval,
java.lang.String userName,
char[] password,
MqttMessage willMessage,
java.lang.String willDestination) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getKey()
Returns a key associated with the message.
|
byte[] |
getPayload()
Sub-classes should override this method to supply the payload bytes.
|
boolean |
isCleanSession() |
boolean |
isMessageIdRequired()
Returns whether or not this message needs to include a message ID.
|
java.lang.String |
toString() |
createWireMessage, createWireMessage, getHeader, getMessageId, getType, isRetryable, setDuplicate, setMessageId
public static final java.lang.String KEY
public MqttConnect(byte info, byte[] data) throws java.io.IOException, MqttException
info
- data
- java.io.IOException
MqttException
public MqttConnect(java.lang.String clientId, int MqttVersion, boolean cleanSession, int keepAliveInterval, java.lang.String userName, char[] password, MqttMessage willMessage, java.lang.String willDestination)
public java.lang.String toString()
toString
in class MqttWireMessage
public boolean isCleanSession()
public byte[] getPayload() throws MqttException
MqttWireMessage
getPayload
in class MqttWireMessage
MqttException
public boolean isMessageIdRequired()
isMessageIdRequired
in class MqttWireMessage
public java.lang.String getKey()
MqttWireMessage
getKey
in class MqttWireMessage