Package com.github.hypfvieh
Class DbusHelper
java.lang.Object
com.github.hypfvieh.DbusHelper
Various DBUS related helper methods.
- Author:
- hypfvieh
-
Method Summary
Modifier and TypeMethodDescriptionFind all <node>-Elements in DBUS Introspection XML and extracts the value of the 'name' attribute.static <T extends org.freedesktop.dbus.interfaces.DBusInterface>
TgetRemoteObject(org.freedesktop.dbus.connections.impl.DBusConnection _connection, String _path, Class<T> _objClass) Creates an java object from a bluez dbus response.
-
Method Details
-
findNodes
public static Set<String> findNodes(org.freedesktop.dbus.connections.impl.DBusConnection _connection, String _path) Find all <node>-Elements in DBUS Introspection XML and extracts the value of the 'name' attribute.- Parameters:
_connection- the dbus connection_path- dbus-path-to-introspect- Returns:
- Set of String, maybe empty but never null
-
getRemoteObject
public static <T extends org.freedesktop.dbus.interfaces.DBusInterface> T getRemoteObject(org.freedesktop.dbus.connections.impl.DBusConnection _connection, String _path, Class<T> _objClass) Creates an java object from a bluez dbus response.- Type Parameters:
T- some class/interface implementing/extendingDBusInterface- Parameters:
_connection- Dbus connection to use_path- dbus request path_objClass- interface class to use- Returns:
- the created object or null on error
-