hypfvieh / dbus-java

Improved version of java DBus library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/)
https://hypfvieh.github.io/dbus-java/
MIT License
185 stars 73 forks source link

to monitor all notification #142

Closed maifeeulasad closed 3 years ago

maifeeulasad commented 3 years ago

I couldn't find any discussion tab. That's why I'm creating a new issue.

Can I use this library to observe/monitor all notification?

Thanks.

hypfvieh commented 3 years ago

What do you mean by notification? Do you mean signals? What do you mean by "all"?

DBus only propagates signals to subscribed handlers, so listen for anything will not "just work". Iterating over all applications on both session and system bus and heavy usage of introspection data (getting it, parsing it, creating handlers etc) may allow you to register a handler to most applications.

I don't think it would be a good idea anyhow to listen to all signals at once, because there will be tons of messages all the time. This may kill your application due to heavy memory usage.