Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public interface MqttMessageListener

Receives the messages of one subscription made with MqttClient.subscribe(String, int, MqttMessageListener). Called on the EDT.

Methods

public abstract void messageArrived(String topic, byte[] payload, boolean retained)A message matching the subscription’s topic filter arrived.

Method details

messageArrived

public abstract void messageArrived(String topic, byte[] payload, boolean retained)
A message matching the subscription’s topic filter arrived.

Parameters

topic String
the topic name the message was published to
payload byte[]
the message body
retained boolean
true when the broker sent it from its retained store