|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessageHandler
Handles received MqttMessages. There is a method for each message type. This handler will always be called by the IO thread that owns the channel. It
is safe to invoke any method on the channel in these methods. Implementations must not block this thread.
| Method Summary | |
|---|---|
void |
channelClosed(MqttChannel channel,
Throwable cause)
Called when a MQTT channel is formally closed. |
void |
channelOpened(MqttChannel channel)
Called when a MQTT channel is opened. |
void |
connAck(MqttChannel channel,
ConnAckMessage message)
Called when a ConnAckMessage is received through the specified channel |
void |
connect(MqttChannel channel,
ConnectMessage message)
Called when a ConnectMessage is received through the specified channel |
void |
disconnect(MqttChannel channel,
DisconnectMessage message)
Called when a DisconnectMessage is received through the specified channel |
void |
pubAck(MqttChannel channel,
PubAckMessage message)
Called when a PubAckMessage is received through the specified channel |
void |
pubComp(MqttChannel channel,
PubCompMessage message)
Called when a PubCompMessage is received through the specified channel |
void |
publish(MqttChannel channel,
PubMessage message)
Called when a PubMessage is received through the specified channel |
void |
pubRec(MqttChannel channel,
PubRecMessage message)
Called when a PubRecMessage is received through the specified channel |
void |
pubRel(MqttChannel channel,
PubRelMessage message)
Called when a PubRelMessage is received through the specified channel |
void |
subAck(MqttChannel channel,
SubAckMessage message)
Called when a SubAckMessage is received through the specified channel |
void |
subscribe(MqttChannel channel,
SubscribeMessage message)
Called when a SubscribeMessage is received through the specified channel |
void |
unsubAck(MqttChannel channel,
UnsubAckMessage message)
Called when a UnsubAckMessage is received through the specified channel |
void |
unsubscribe(MqttChannel channel,
UnsubscribeMessage message)
Called when a UnsubscribeMessage is received through the specified channel |
| Method Detail |
|---|
void connect(MqttChannel channel,
ConnectMessage message)
throws Exception
ConnectMessage is received through the specified channel
Exception
void connAck(MqttChannel channel,
ConnAckMessage message)
throws Exception
ConnAckMessage is received through the specified channel
Exception
void publish(MqttChannel channel,
PubMessage message)
throws Exception
PubMessage is received through the specified channel
Exception
void pubAck(MqttChannel channel,
PubAckMessage message)
throws Exception
PubAckMessage is received through the specified channel
Exception
void pubRec(MqttChannel channel,
PubRecMessage message)
throws Exception
PubRecMessage is received through the specified channel
Exception
void pubRel(MqttChannel channel,
PubRelMessage message)
throws Exception
PubRelMessage is received through the specified channel
Exception
void pubComp(MqttChannel channel,
PubCompMessage message)
throws Exception
PubCompMessage is received through the specified channel
Exception
void subscribe(MqttChannel channel,
SubscribeMessage message)
throws Exception
SubscribeMessage is received through the specified channel
Exception
void subAck(MqttChannel channel,
SubAckMessage message)
throws Exception
SubAckMessage is received through the specified channel
Exception
void unsubscribe(MqttChannel channel,
UnsubscribeMessage message)
throws Exception
UnsubscribeMessage is received through the specified channel
Exception
void unsubAck(MqttChannel channel,
UnsubAckMessage message)
throws Exception
UnsubAckMessage is received through the specified channel
Exception
void disconnect(MqttChannel channel,
DisconnectMessage message)
throws Exception
DisconnectMessage is received through the specified channel
Exceptionvoid channelOpened(MqttChannel channel)
MQTT channel is opened. Opened is when the connection to the broker or from the client has been established but before
any messages have been sent.
channel - The channel that was opened.
void channelClosed(MqttChannel channel,
Throwable cause)
MQTT channel is formally closed.
channel - The channel that was closedcause - The reason the channel was closed. Null if the channel was not closed because of an exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||