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.
|
protected Thread |
getThread()
Returns the thread used by this callback.
|
boolean |
isQuiesced() |
void |
messageArrived(MqttPublish sendMessage)
This method is called when a message arrives on a topic.
|
void |
quiesce()
Let the call back thread quiesce.
|
void |
run()
When an object implementing interface
Runnable is used to create a thread, starting
the thread causes the object's run method to be called in that separately executing
thread. |
void |
setCallback(MqttCallback mqttCallback) |
void |
setClientState(ClientState clientState) |
void |
start(String threadName)
Starts up the Callback thread.
|
void |
stop()
Stops the callback thread.
|
public void asyncOperationComplete(MqttToken token)
public void connectionLost(@Nullable MqttException cause)
cause
- the reason behind the loss of connection.public void fireActionEvent(@Nullable MqttToken token)
token
- public boolean isQuiesced()
public void messageArrived(MqttPublish sendMessage)
sendMessage
- the MQTT SEND message.public void quiesce()
public void run()
Runnable
Runnable
is used to create a thread, starting
the thread causes the object's run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may take any action whatsoever.
run
in interface Runnable
Thread.run()
public void setCallback(MqttCallback mqttCallback)
public void setClientState(ClientState clientState)
public void start(String threadName)
public void stop()