How to get the system signals like "hibernate" by dbus-java?

Luna Luan luanying at huawei.com
Sun Aug 23 18:43:25 PDT 2009


Hi

I'm a newbie in dbus and java, i've been confused by a problem for days, 
 
I'm now programing a java application, this application need to listen the
the system(Linux)'s hibernate,suspend,wakeup and usb device insert events to
do some reaction! and supposed to be perfectly used in all kind of linux
distributions independently.
 
so i download dbus-java-2.6 and libmatthew-java-0.7.2,and compile them into
jar file.

i read the "test" program in dbus-java first,and found that there seems has
two connections, a sever connection and a client connection, one send
questions and one receive

while my questions is:
in my program.i make only one connection to the bus,and add a SignalHandler
for it to deal with the "hibernate" signal sent by the system,but how can i
define the signal to make sure that when the system get hibernate, the
"SignalHandler" would be executed.

would anyone please help me? any instruction is grateful and some code
examples would be the best! *^_^*

Luna
-- 
View this message in context: http://www.nabble.com/How-to-get-the-system-signals-like-%22hibernate%22-by-dbus-java--tp25109143p25109143.html
Sent from the Free Desktop - dbus mailing list archive at Nabble.com.



More information about the dbus mailing list