Java D-Bus binding for JavaME Profiles
Matthew Johnson
dbus at matthew.ath.cx
Tue Oct 27 02:28:39 PDT 2009
On Sun Oct 25 20:16, Schmottlach, Glenn wrote:
> Unfortunately, Java Reflection and Generics did not make it into the CLDC profile.
> Are you aware of a reworked version of your binding in Palm's WebOS
> (http://palm.cdnetworks.net/opensource/1.1.0/palmipc-java-1.0.0.tgz)
> It looks like they might have pared it down a little and provided some
> form of "mini" D-Bus binding that doesn't require reflection. It
> looks like the lower level core library . . . analogous the the
> reference D-Bus 'C' library. Perhaps that's fertile ground to explore.
Ah, I did not. It does remind me, however, that my bindings do supply a
low-level interface[1]. If you compile on a full JDK and then only use
those parts, it should work, since I use nothing complicated at all.
I don't know what the palmipc folks use, I'll take a look.
1. Here's the example of the low-level API from the dbus-java
documentation:
BusAddress address = new BusAddress(
System.getenv("DBUS_SESSION_BUS_ADDRESS"));
Transport conn = new Transport(address, true);
Message m = new MethodCall("org.freedesktop.DBus", "/org/freedesktop/DBus",
"org.freedesktop. DBus", "Hello", (byte) 0, null);
conn.mout.writeMessage(m);
m = conn.min.readMessage();
System.out.println("Response to Hello is: "+m);
m = new MethodCall("org.freedesktop.DBus", "/org/freedesktop/DBus",
"org.freedesktop.DBus", "RequestName", (byte) 0,
"su", "org.testname", 0);
conn.mout.writeMessage(m);
conn.disconnect();
--
Matthew Johnson
www.matthew.ath.cx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20091027/9180c0a1/attachment.pgp
More information about the dbus
mailing list