class MyMqttCallbackExtended implements MqttCallbackExtended {
override connectComplete(reconnect : boolean, serverURI : string) {
}
override connectionLost(error : Throwable) {
}
override messageArrived(topic : string, message : MqttMessage) {
}
override deliveryComplete(token : IMqttDeliveryToken) {
}
}
open class MyMqttCallbackExtended : MqttCallbackExtended {
override fun connectComplete(reconnect: Boolean, serverURI: String) {}
override fun connectionLost(error: Throwable) {}
override fun messageArrived(topic: String, message: MqttMessage) {}
override fun deliveryComplete(token: IMqttDeliveryToken) {}
}
public interface MqttCallback {
void connectionLost(Throwable cause);
void messageArrived(String topic, MqttMessage message) throws Exception;
void deliveryComplete(IMqttDeliveryToken token);
}
public interface MqttCallbackExtended extends MqttCallback {
void connectComplete(boolean reconnect, String serverURI);
}
报错信息
error: Class 'MyMqttCallbackExtended' is not abstract and does not implement abstract member public abstract fun connectionLost(p0: Throwable!): Unit defined in org.eclipse.paho.client.mqttv3.MqttCallbackExtended
1 个回复
小新的狗叫小白 - 小新的狗叫小白
一样的问题,有解决吗?