Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] MQTT Client J2ME

Actually I was using the Gemalto/Cinterion dev environment for building the J2ME agent. For the J2ME you need to consider some differences in regards to establishing the data connection. I guess the connection specific part will need to be customized accordingly to the host device. We could create different SocketFactories for different J2ME devices upon request. Here is an example for the Gemalto/Cinterion EHSx modules


import java.io.IOException;

import javax.microedition.io.Connector;
import javax.microedition.io.SocketConnection;


public class SocketFactory extends Object {

private static SocketFactory sf = null;
protected SocketConnection sc = null;
private GPRSConnectOptions connOptions = GPRSConnectOptions
.getConnectOptions();

private static SocketFactory getSocketFactory() {
if (sf == null) {
sf = new SocketFactory();
}
return sf;
}

public SocketConnection createSocket(String host, int port)
throws IOException {


sc = (SocketConnection) Connector.open("socket://" + host + ":" + port
+ ";bearer_type="
+ connOptions.getBearerType() 
+ ";access_point="
+ connOptions.getAPN() 
+ ";username="
+ connOptions.getUser() 
+ ";password="
+ connOptions.getPasswd() 
+ ";timeout="
+ connOptions.getTimeout());

sc.setSocketOption(SocketConnection.LINGER, 5); 

return sc;
}




On Fri, Aug 29, 2014 at 12:03 PM, Guy Dillen <guy.dillen@xxxxxxxxx> wrote:
Hello Oleg,

As Bin Zhang just mentioned: build the j2me part (org.eclipse.paho.jmeclient) of the download on my Windows 7 machine with the J2ME  compiler, that’s it?
Should the same javame (source) version also work with Java 8 ME?

@Ian Indeed that would be great to add a J2ME page to the Eclipse Paho website. I think there’s interest in the use of the MQTT client from J2ME.

Thanks.
Guy

From: Oleg Pachkovets <oleg.pts@xxxxxxxxx>
Reply-To: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Date: Friday 29 August 2014 11:55
To: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Subject: Re: [paho-dev] MQTT Client J2ME

Hello Guy,

yes, the sources shall work with the concept board out of the box.

Kind Regards
Oleg


On Fri, Aug 29, 2014 at 9:31 AM, Guy Dillen <guy.dillen@xxxxxxxxx> wrote:
Hi,

I would like using the Eclipse Paho MQTT Client with J2ME (on the Gemalto Cinterion Concept Board). Should I just download the source zip file 
org.eclipse.paho.mqtt.java-1.0.0.zip  from http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.java.git/ and build the org.eclipse.paho.jmeclient on my target J2ME platform?

Thanks.
Guy

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

_______________________________________________ paho-dev mailing list paho-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/paho-dev

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top