Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] interface changes

the Develop branch was moved across to Master before i had chance to document the updates.  I'll provide updates via the bug Andy has raised.  The main change to the Java client was to provide two  programming interfaces a blocking interface where the API does not return until the action is complete (close to the existing API) and a new non-blocking API that returns immediately and provides notification when the action has completed.  Non-blocking has been requested a number of times and is often used in embedded and mobiel apps. In doing this there were a a small number of changes made which impact the old API:

- A new publish method was added to the main mqtt client objects. It takes a topic String (not a topic object) and a payload, following a similar pattern to subscribe....
- The MqttTopic object was providing little value so combined with the new publish method the callback was changed to take a String as opposed to an MqttTopic object with a view to deprecating MqttTopic in the future.
-  With the advent of both a blocking and non-blocking API more interfaces have been introduced including a IMqttToken which IMqttDeliveryToken subclasses.


All the best
Dave Locke

Senior Inventor, Pervasive and Advanced Messaging Technologies

locke@xxxxxxxxxx
Dave Locke/UK/IBM@ibmgb
7-246165 (int) +44 1962816165 (ext)
37274133 (mobex) +44 7764132584 (ext)

Fringe Bluepages with fuel injection
My Cattail: Share files in IBM and save your in-box


 



From:        "andypiperuk@xxxxxxxxx" <andypiperuk@xxxxxxxxx>
To:        General development discussions for paho project <paho-dev@xxxxxxxxxxx>,
Date:        23/04/2013 16:57
Subject:        Re: [paho-dev] interface changes
Sent by:        paho-dev-bounces@xxxxxxxxxxx




Hi René

Thanks for this, and apologies for the confusion.

There are currently two tags in git:

- v0.1 is the original code from IBM, which has been made available as a binary jar already.

- v0.2.1 was formerly the 'develop' branch, and was moved over to 'master' a couple of weeks ago -> http://dev.eclipse.org/mhonarc/lists/paho-dev/msg00493.html

The commit for this big change adding async support and changing the topic etc did include a comment that full information would be published on the mailing list and Paho site, but I don't think Dave has done that yet. I will raise a bug asking for that to happen.

I cannot comment on the two specific changes you've highlighted but there were a couple of goals, one to move to a non-blocking model and secondly to dramatically improve support for mobile platforms like Android. 

We expect v0.2 to become v0.5 which will be our first formal release, fairly soon (current plan is by the end of May). There are one or two outstanding things to fix or add in Bugzilla, but broadly speaking this is what we expect to be stable.

Apologies again and I hope this helps to clear things up a little.

Andy



On Tue, Apr 23, 2013 at 4:41 PM, René Jansen <rvjansen@xxxxxxxxx> wrote:
I probably missed the memo, but I am mildly bemused by the interface changes on MqttCallback. I just published some source code in an article in Dr Dobbs and see now after a git pull that:

[/Users/rvjansen/sec/Sec.nrx 11 7 3] Error: Class is not abstract, yet it does not implement method 'messageArrived(String,MqttMessage)' from abstract class 'org.eclipse.paho.client.mqttv3.MqttCallback'
[/Users/rvjansen/sec/Sec.nrx 11 7 3] Error: Class is not abstract, yet it does not implement method 'deliveryComplete(IMqttDeliveryToken)' from abstract class 'org.eclipse.paho.client.mqttv3.MqttCallback'
Compilation of 'Sec.nrx' failed [2 errors]
Translate time: 0.7s

more so because the change from MqttTopic to String seems unneeded and for deliveryComplete from MqttDeliveryToken to IMqDeliveryToken only does seem to satisfy some Hungarian notation goal.

So: when is this interface stable and safe to develop in?

best regards,

René Jansen.


_______________________________________________
paho-dev mailing list

paho-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/paho-dev



--
Andy Piper | Farnborough, Hampshire (UK)
blog:
http://andypiper.co.uk   |   skype: andypiperuk
twitter: @andypiper  |  images:
http://www.flickr.com/photos/andypiper _______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/paho-dev


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Back to the top