Java Signal Handler

Sören Busse soeren.2011 at live.de
Tue Dec 1 08:13:00 PST 2015


Hi,
I am trying to add a Signal Handler on a DirectConnection.
So I used:
DirectConnection conn = new DirectConnection("tcp:host=" + HOST +",port=4242");
conn.addSigHandler(new DBusMatchRule("signal","/thomas/server","CpuLoadChange"), new Handler());





public class Handler implements DBusSigHandler<DBusSignal>{
    @Override

    public void handle(DBusSignal sig) {

        try {

            System.out.println(Arrays.toString(sig.getParameters()));

        } catch (DBusException e) {

            // TODO Auto-generated catch block

            e.printStackTrace();

        }

    }
}




Problem is, that the handle method isn't executed. Is there a fix for this?
I can't use a DBusInterface, because the server isn't implementing one. 

	
		
			
		
		Diese E-Mail wurde von einem virenfreien Computer gesendet, der von Avast geschützt wird. www.avast.com 		
	

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20151201/a8accbc1/attachment.html>


More information about the dbus mailing list