Seeking Dbus-Java Binding examples using Jython

Schmottlach, Glenn glenn.schmottlach at harman.com
Fri Apr 17 05:58:58 PDT 2009


Can anyone point me to sample code that uses the D-Bus Java binding from
Jython? So far I've gotten this to work:

 

from org.freedesktop.dbus import *

 

if __name__ == '__main__':

    host = "127.0.0.1"

    port = 6667

    bus = DBusConnection.getConnection("tcp:host=%s,port=%d" % (host,
port))

    inf = bus.getRemoteObject("com.BenchmarkSuite",
"/com/BenchmarkSuite")

    bus.disconnect()

 

Once I have the interface, I don't know how to actually call a method on
the remote service using Jython. Is it required that I create Java
interface proxy stubs (via the CreateInterface tool) and compile them
into JARs before I can call these remote methods? Can Jython utilize the
D-Bus XML interface description to synthesize an interface?

 

Ideally, I'd like to avoid creating Java source code using an external
tool that I have to compile into a JAR in order to call a remote
service. Is there a way to do this dynamically?

 

Any guidance would be help.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090417/104772b9/attachment.html 


More information about the dbus mailing list