Closed rm5248 closed 5 years ago
Sounds good to me. I think this feature maybe useful for other cases as well. If you do the implementation and send a PR, I'll take a look and merge it afterwards.
Thanks for your PR. I cleaned it up a bit and merged it.
I also removed the sendSignal method, as this method is a copy of sendMessage. Instead I updated the javadoc of sendMessage (renaming this method would break the compatibility with older code). I don't think we should add more methods to the AbstractConnection class if not necessary.
That all looks good to me. I will continue to test it out on my end to ensure that everything is working appropriately.
For a project that I'm working on, I need to have the ability to listen to arbitrary signals on the bus. A few years ago, I patched dbus-java(2.7) to give it this capability. I just tried with the current version of dbus-java and it won't work correctly, due to how signals work(you need to create a class in the correct package for it to be called correctly). Two questions with this:
AbstractConnection
a new variable for the custom signals, the same type ashandledSignals
and then looks at these custom handlers after looking at the normal(typed) handlers.I can do the implementation, I just wanted to get feedback before I started on this.