public class CommsCallback
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
boolean |
running |
Modifier and Type | Method and Description |
---|---|
void |
asyncOperationComplete(MqttToken token) |
void |
connectionLost(MqttException cause)
This method is called when the connection to the server is lost.
|
void |
fireActionEvent(MqttToken token)
An action has completed - if a completion listener has been set on the
token then invoke it with the outcome of the action.
|
boolean |
isQuiesced() |
void |
messageArrived(MqttPublish sendMessage)
This method is called when a message arrives on a topic.
|
void |
messageArrivedComplete(int messageId,
int qos) |
void |
quiesce()
Let the call back thread quiesce.
|
void |
removeMessageListener(java.lang.String topicFilter) |
void |
removeMessageListeners() |
void |
run() |
void |
setCallback(MqttCallback mqttCallback) |
void |
setClientState(ClientState clientState) |
void |
setManualAcks(boolean manualAcks) |
void |
setMessageListener(java.lang.String topicFilter,
IMqttMessageListener messageListener) |
void |
setReconnectCallback(MqttCallbackExtended callback) |
void |
start(java.lang.String threadName)
Starts up the Callback thread.
|
void |
stop()
Stops the callback thread.
|
public void setClientState(ClientState clientState)
public void start(java.lang.String threadName)
public void stop()
public void setCallback(MqttCallback mqttCallback)
public void setReconnectCallback(MqttCallbackExtended callback)
public void setManualAcks(boolean manualAcks)
public void run()
run
in interface java.lang.Runnable
public void connectionLost(MqttException cause)
cause
- the reason behind the loss of connection.public void fireActionEvent(MqttToken token)
token
- public void messageArrived(MqttPublish sendMessage)
sendMessage
- the MQTT SEND message.public void quiesce()
public boolean isQuiesced()
public void messageArrivedComplete(int messageId, int qos) throws MqttException
MqttException
public void asyncOperationComplete(MqttToken token)
public void setMessageListener(java.lang.String topicFilter, IMqttMessageListener messageListener)
public void removeMessageListener(java.lang.String topicFilter)
public void removeMessageListeners()