org.eclipse.paho.client.mqttv3.internal.wire
Class MqttPingReq

java.lang.Object
  extended by org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage
      extended by org.eclipse.paho.client.mqttv3.internal.wire.MqttPingReq

public class MqttPingReq
extends MqttWireMessage

An on-the-wire representation of an MQTT PINGREQ message.


Field Summary
 
Fields inherited from class org.eclipse.paho.client.mqttv3.internal.wire.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 Summary
MqttPingReq()
           
MqttPingReq(byte info, byte[] variableHeader)
           
 
Method Summary
 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.
 
Methods inherited from class org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage
createWireMessage, createWireMessage, decodeUTF8, encodeMBI, encodeMessageId, encodeUTF8, getHeader, getMessageId, getPayload, getType, isRetryable, readMBI, setDuplicate, setMessageId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MqttPingReq

public MqttPingReq()

MqttPingReq

public MqttPingReq(byte info,
                   byte[] variableHeader)
            throws IOException
Throws:
IOException
Method Detail

isMessageIdRequired

public boolean isMessageIdRequired()
Returns false as message IDs are not required for MQTT PINGREQ messages.

Overrides:
isMessageIdRequired in class MqttWireMessage

getVariableHeader

protected byte[] getVariableHeader()
                            throws MqttException
Specified by:
getVariableHeader in class MqttWireMessage
Throws:
MqttException

getMessageInfo

protected byte getMessageInfo()
Description copied from class: MqttWireMessage
Sub-classes should override this to encode the message info. Only the least-significant four bits will be used.

Specified by:
getMessageInfo in class MqttWireMessage

getKey

public String getKey()
Description copied from class: MqttWireMessage
Returns a key associated with the message. For most message types this will be unique. For connect, disconnect and ping only one message of this type is allowed so a fixed key will be returned

Overrides:
getKey in class MqttWireMessage
Returns:
key a key associated with the message


Copyright © 2013. All Rights Reserved.