fusesource / mqtt-client

A Java MQTT Client
http://mqtt-client.fusesource.org/
Apache License 2.0
1.27k stars 369 forks source link

can't find the method in CallbackConnection #87

Open peterforme opened 7 years ago

peterforme commented 7 years ago

the code in the reamme like that :

final CallbackConnection connection = mqtt.callbackConnection(); connection.listener(new Listener() {

        public void onDisconnected() {
        }
        public void onConnected() {
        }

        public void onPublish(UTF8Buffer topic, Buffer payload, Runnable ack) {
            // You can now process a received message from a topic.
            // Once process execute the ack runnable.
            ack.run();
        }
        public void onFailure(Throwable value) {
            connection.close(null); // a connection failure occured.
        }
    });
    connection.connect(new Callback<Void>() {
        public void onFailure(Throwable value) {
            result.failure(value); // If we could not connect to the server.
        }

connection.close(null); result.failure(value);

In the project , connection doesn't have a method called close result varible is not defined

what's wrong?

MASARY commented 7 years ago

so am I, what's wrong? anybody knows?

adrienjuguet commented 7 years ago

I have the same problems... Anybody has an answer ?