public class TokenListener
extends java.lang.Object
implements com.ibm.mqtt.MqttSimpleCallback
| Red (ahuseyno) |
| Red (ahuseyno) |
| Constructor and Description |
|---|
TokenListener(ProxyModelInfrastructure proxyModelInfrastructure)
Initialize the instance by reading needed fields from the remoteModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectionLost()
Callback method when the connection with the broker is lost.
|
void |
publishArrived(java.lang.String topicName,
byte[] payload,
int qos,
boolean retained)
Callback method when a message from the topic is received.
|
public TokenListener(ProxyModelInfrastructure proxyModelInfrastructure)
proxyModelInfrastructure - The infrastructure that created this listener and controls the state of the execution.public void connectionLost()
throws java.lang.Exception
connectionLost in interface com.ibm.mqtt.MqttSimpleCallbackjava.lang.Exception - If the connection was lost.MqttSimpleCallback.connectionLost()public void publishArrived(java.lang.String topicName,
byte[] payload,
int qos,
boolean retained)
throws java.lang.Exception
publishArrived in interface com.ibm.mqtt.MqttSimpleCallbacktopicName - The name of the topic from which the message was received.payload - The MQTT message.qos - The Quality of Service at which the message was delivered by the broker.retained - indicates if this message is retained by the broker.java.lang.Exception - if there is a problem reading next token or setting attribute valueMqttSimpleCallback.publishArrived(java.lang.String, byte[], int, boolean)