public interface BeforePublishSendCallback extends SynchronousCallback
PUBLISH message is sent to a client.
This callback gets called very often, be sure to have a efficient implementation.
This callback allows the modification of MQTT PUBLISH messages at the last moment before they are sent to the client.
If more than one BeforePublishSendCallback is registered, they will get called ordered by decreasing CallbackPriority. If an exception is thrown in a BeforePublishSendCallback, all pending callbacks will not be executed.
| Modifier and Type | Method and Description |
|---|---|
void |
beforePublishSend(ModifiablePUBLISH publish,
ClientData clientData) |
priorityvoid beforePublishSend(ModifiablePUBLISH publish, ClientData clientData) throws BeforePublishSendException
publish - A ModifiablePUBLISH that will be sent to the client or the result of BeforePublishSendCallbacks with higher CallbackPriority.clientData - The client ClientData for the client, to which this PUBLISH will be sent to.BeforePublishSendException - if the underlying PUBLISH should be dropped. All pending BeforePublishSendCallbacks will not be executed.Copyright © 2013-2018 dc-square GmbH. All Rights Reserved.