Java generic signal handler

minimulisha03 ericcarmody at hotmail.com
Tue Feb 16 08:46:04 PST 2010


Is there a way to connect to the session or system bus and listen for all
activity like method calls and signals using the low level api?


minimulisha03 wrote:
> 
> I'm kinda having trouble understanding how to implement this, how would i
> connect to the session bus and just listen for messages?  Or is that even
> possible?
> 
> String addr = System.getenv("DBUS_SESSION_BUS_ADDRESS");
> Debug.print(addr);
> BusAddress address = new BusAddress(addr);
> Debug.print(address);
> Transport conn = new Transport(address);
> .
> .
> .
> What would come next if i wanted to listen to all activity on the session
> bus?
> 
> Thanks again,
> -Eric
> 
> 
> Matthew Johnson-3 wrote:
>> 
>> On Wed Feb 10 15:45, minimulisha03 wrote:
>>> So what your saying is there is pretty much no way to do this?
>>> 
>>> Matthew Johnson-3 wrote:
>>> > In that case you may wish to use the low-level API[0] which does not
>>> > provide an
>>> > object mapping, but you can't use that as you don't know in advance
>>> what
>>> > the
>>> > objects are going to be.
>>> > 0.
>>> >
>>> http://dbus.freedesktop.org/doc/dbus-java/dbus-java/dbus-javase13.html#x38-4100013
>> 
>> Sorry, that was very badly phrased of me.
>> 
>> You can't use the object mapping in the high-level bindings, since you
>> don't
>> know what the objects are in advance, therefore there isn't much to be
>> gained
>> by using the high-level bindings over the low-level ones. If you use the
>> low-level bindings then  you can inspect every received signal.
>> 
>> Matt
>> 
>> -- 
>> www.matthew.ath.cx
>> D-Bus Java
>> 
>>  
>> _______________________________________________
>> dbus mailing list
>> dbus at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dbus
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Java-generic-signal-handler-tp27523741p27611291.html
Sent from the Free Desktop - dbus mailing list archive at Nabble.com.



More information about the dbus mailing list