Class DbusHelper

java.lang.Object
com.github.hypfvieh.DbusHelper

public final class DbusHelper extends Object
Various DBUS related helper methods.
Author:
hypfvieh
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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/extending DBusInterface
      Parameters:
      _connection - Dbus connection to use
      _path - dbus request path
      _objClass - interface class to use
      Returns:
      the created object or null on error