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

java.lang.Object
  extended by org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage
      extended by org.eclipse.paho.client.mqttv3.internal.wire.MqttPersistableWireMessage
All Implemented Interfaces:
MqttPersistable
Direct Known Subclasses:
MqttPublish, MqttPubRel

public abstract class MqttPersistableWireMessage
extends MqttWireMessage
implements MqttPersistable


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
MqttPersistableWireMessage(byte type)
           
 
Method Summary
 byte[] getHeaderBytes()
          Returns the header bytes in an array.
 int getHeaderLength()
          Returns the length of the header.
 int getHeaderOffset()
          Returns the offset of the header within the byte array returned by MqttPersistable.getHeaderBytes().
 byte[] getPayloadBytes()
          Returns the payload bytes in an array.
 int getPayloadLength()
          Returns the length of the payload.
 int getPayloadOffset()
          Returns the offset of the payload within the byte array returned by MqttPersistable.getPayloadBytes().
 
Methods inherited from class org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage
createWireMessage, createWireMessage, decodeUTF8, encodeMBI, encodeMessageId, encodeUTF8, getHeader, getKey, getMessageId, getMessageInfo, getPayload, getType, getVariableHeader, isMessageIdRequired, isRetryable, readMBI, setDuplicate, setMessageId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MqttPersistableWireMessage

public MqttPersistableWireMessage(byte type)
Method Detail

getHeaderBytes

public byte[] getHeaderBytes()
                      throws MqttPersistenceException
Description copied from interface: MqttPersistable
Returns the header bytes in an array. The bytes start at MqttPersistable.getHeaderOffset() and continue for MqttPersistable.getHeaderLength().

Specified by:
getHeaderBytes in interface MqttPersistable
Returns:
the header bytes.
Throws:
MqttPersistenceException

getHeaderLength

public int getHeaderLength()
                    throws MqttPersistenceException
Description copied from interface: MqttPersistable
Returns the length of the header.

Specified by:
getHeaderLength in interface MqttPersistable
Returns:
the header length
Throws:
MqttPersistenceException

getHeaderOffset

public int getHeaderOffset()
                    throws MqttPersistenceException
Description copied from interface: MqttPersistable
Returns the offset of the header within the byte array returned by MqttPersistable.getHeaderBytes().

Specified by:
getHeaderOffset in interface MqttPersistable
Returns:
the header offset.
Throws:
MqttPersistenceException

getPayloadBytes

public byte[] getPayloadBytes()
                       throws MqttPersistenceException
Description copied from interface: MqttPersistable
Returns the payload bytes in an array. The bytes start at MqttPersistable.getPayloadOffset() and continue for MqttPersistable.getPayloadLength().

Specified by:
getPayloadBytes in interface MqttPersistable
Returns:
the payload bytes.
Throws:
MqttPersistenceException

getPayloadLength

public int getPayloadLength()
                     throws MqttPersistenceException
Description copied from interface: MqttPersistable
Returns the length of the payload.

Specified by:
getPayloadLength in interface MqttPersistable
Returns:
the payload length.
Throws:
MqttPersistenceException

getPayloadOffset

public int getPayloadOffset()
                     throws MqttPersistenceException
Description copied from interface: MqttPersistable
Returns the offset of the payload within the byte array returned by MqttPersistable.getPayloadBytes().

Specified by:
getPayloadOffset in interface MqttPersistable
Returns:
the payload offset.
Throws:
MqttPersistenceException


Copyright © 2013. All Rights Reserved.