adding signal handler in java

Henrik Petander henrik.petander at gmail.com
Thu Dec 14 01:28:55 PST 2006


Hi Matt,

Thanks, I got it working with that.

-Henrik

On 12/13/06, Matthew Johnson <dbus at matthew.ath.cx> wrote:
> On Tue, 12 Dec 2006, Henrik Petander wrote:
>
> > Hi,
>
> Hi
>
> > My code can create a connection to DBus session bus, but adding of the
> > signal handler  fails with the following message from the dbus
> > exception:
> >
> > "Interface name 'TestSignalInterface' is invalid".
> >
> > I am not sure, if I am missing something obvious here and would
> > appreciate any advice on this.
>
> Aha, interesting problem. The way the bindings work is the interface
> name is derived from package.interface of the DBusInterfaces you
> export. In this case, since there is no package the interface is simply
> 'TestSignalInterface'. However, D-Bus enforces that interface names must
> have at least one '.' in them, IE, you cannot have them in the top level
> package.
>
> This is something I'd not really realized and so haven't documented or
> have any checks with more informative error messages in. I shall add
> them now I've noticed, thanks (-:
>
> If you move TestSignalInterface into a package then it works.
>
> Matt
> --
> Matthew Johnson
> http://www.matthew.ath.cx/
>


More information about the dbus mailing list