public interface ModifiablePUBLISH
BeforePublishSendCallback.| Modifier and Type | Method and Description |
|---|---|
PUBLISH |
copy() |
byte[] |
getPayload() |
QoS |
getQoS() |
String |
getTopic() |
boolean |
isDuplicateDelivery() |
boolean |
isRetain() |
void |
setPayload(byte[] payload)
By using this setter the payload of this
PUBLISH can be modified before it is sent to a client
Changes made to the payload here are only visible to the specific client to which this ModifiablePUBLISH is sent. |
void |
setTopic(String topic)
By using this setter the topic of this
PUBLISH can be modified before it is sent to a client. |
byte[] getPayload()
byte[] directly, as the resulting behavior is undefined and can have far reaching consequences, use setPayload() method instead.void setPayload(byte[] payload)
PUBLISH can be modified before it is sent to a client
Changes made to the payload here are only visible to the specific client to which this ModifiablePUBLISH is sent.
These changes will have no effect on message routing or authorization.
The modified payload will not be visible in any other callbacks other than BeforePublishSendCallback and OnPublishSend.
payload - a byte[] containing the modified payloadString getTopic()
void setTopic(String topic)
PUBLISH can be modified before it is sent to a client.
Changes made to the topic here are only visible to the specific client to which this ModifiablePUBLISH is sent.
These changes will have no effect on message routing or authorization.
The modified topic will not be visible in any other callbacks other than BeforePublishSendCallback and OnPublishSend.
topic - the modified topicboolean isDuplicateDelivery()
true if the message is a duplicate messageboolean isRetain()
QoS getQoS()
Copyright © 2013-2018 dc-square GmbH. All Rights Reserved.