public abstract class MqttPersistableWireMessage extends MqttWireMessage implements MqttPersistable
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 |
---|
MqttPersistableWireMessage(byte type) |
Modifier and Type | Method and Description |
---|---|
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() . |
createWireMessage, createWireMessage, getHeader, getKey, getMessageId, getPayload, getType, isMessageIdRequired, isRetryable, setDuplicate, setMessageId, toString
public byte[] getHeaderBytes() throws MqttPersistenceException
MqttPersistable
MqttPersistable.getHeaderOffset()
and continue for MqttPersistable.getHeaderLength()
.getHeaderBytes
in interface MqttPersistable
MqttPersistenceException
public int getHeaderLength() throws MqttPersistenceException
MqttPersistable
getHeaderLength
in interface MqttPersistable
MqttPersistenceException
public int getHeaderOffset() throws MqttPersistenceException
MqttPersistable
MqttPersistable.getHeaderBytes()
.getHeaderOffset
in interface MqttPersistable
MqttPersistenceException
public byte[] getPayloadBytes() throws MqttPersistenceException
MqttPersistable
MqttPersistable.getPayloadOffset()
and continue for MqttPersistable.getPayloadLength()
.getPayloadBytes
in interface MqttPersistable
MqttPersistenceException
public int getPayloadLength() throws MqttPersistenceException
MqttPersistable
getPayloadLength
in interface MqttPersistable
MqttPersistenceException
public int getPayloadOffset() throws MqttPersistenceException
MqttPersistable
MqttPersistable.getPayloadBytes()
.getPayloadOffset
in interface MqttPersistable
MqttPersistenceException