public interface OnTopicSubscriptionCallback extends SynchronousCallback
SubackReturnCode for a Topic and a ClientData.
This callback is called after the OnAuthorizationCallback but before the OnSubscribeCallback.
When more OnTopicSubscriptionCallbacks are added the one that fires last (with the least priority)
has the final say.
It is possible to override the MQTT specification
for SUBACK payloads with this callback.
This callback is called once for every topic for every SUBSCRIBE,
it is highly recommended to make the implementation as efficient as possible.| Modifier and Type | Method and Description |
|---|---|
SubackReturnCode |
getSubackReturnCodeForClient(Topic topic,
SubackReturnCode authorizationResult,
ClientData clientData)
|
prioritySubackReturnCode getSubackReturnCodeForClient(Topic topic, SubackReturnCode authorizationResult, ClientData clientData)
topic - the topic to which the client wants to subscribeauthorizationResult - the result of a OnTopicSubscriptionCallback with higher priority if available,
or of the OnAuthorizationCallbacks if available,
or the QoS the client requested.clientData - information about the clientSubackReturnCode that corresponds to the topic in the SUBACK to be sent to the client,
a good default would be authorizationResultCopyright © 2013-2018 dc-square GmbH. All Rights Reserved.