dbus-java properties bindings

Pavel Březina pbrezina at redhat.com
Mon Mar 9 03:44:53 PDT 2015


Hi,
I'm trying to create java interface for sssd dbus interface. I do 
understand how to map methods into java but what is the proper way to 
handle properties?

Example:

package org.freedesktop.sssd

public interface infopipe
{
     public Path[] ListDomains();

     public interface Domains
     {
         /* access properties from here something like: */
         public String name;
     }
}

I'm trying to find a way how to request name property of 
infopipe.Domains interface like:

infopipe.Domains dom = 
conn.getRemoteObject("org.freedesktop.sssd.infopipe", 
"/org/freedesktop/sssd/infopipe/Domains/dom", infopipe.Domains.class);

System.out.println(dom.name);

Is it possible? Or the only way of requesting property is via

Properties props = conn.getRemoteObject("org.freedesktop.sssd.infopipe", 
path, Properties.class);

String name = props.Get("org.freedesktop.sssd.infopipe.Domains", "name");

Thanks.

Please cc me, I am not subscribed.


More information about the dbus mailing list