Klasse DBusConnectionBuilder


public final class DBusConnectionBuilder extends BaseConnectionBuilder<DBusConnectionBuilder,DBusConnection>
Builder to create a new DBusConnection.
Version:
4.1.0 - 2022-02-04
Autor:
hypfvieh
  • Methodendetails

    • forSessionBus

      public static DBusConnectionBuilder forSessionBus(String _machineIdFileLocation)
      Create a new default connection connecting to DBus session bus but use an alternative input for the machineID.
      Parameter:
      _machineIdFileLocation - file with machine ID
      Gibt zurück:
      DBusConnectionBuilder
    • forSystemBus

      public static DBusConnectionBuilder forSystemBus()
      Create new default connection to the DBus system bus.
      Gibt zurück:
      DBusConnectionBuilder
    • forSessionBus

      public static DBusConnectionBuilder forSessionBus()
      Create a new default connection connecting to the DBus session bus.
      Gibt zurück:
      DBusConnectionBuilder
    • forType

      public static DBusConnectionBuilder forType(DBusConnection.DBusBusType _type)
      Create a default connection to DBus using the given bus type.
      Parameter:
      _type - bus type
      Gibt zurück:
      this
    • forType

      public static DBusConnectionBuilder forType(DBusConnection.DBusBusType _type, String _machineIdFile)
      Create a default connection to DBus using the given bus type and machineIdFile.
      Parameter:
      _type - bus type
      _machineIdFile - machineId file
      Gibt zurück:
      this
    • forAddress

      public static DBusConnectionBuilder forAddress(String _address)
      Use the given address to create the connection (e.g. used for remote TCP connected DBus daemons).
      Parameter:
      _address - address to use
      Gibt zurück:
      this
    • forAddress

      public static DBusConnectionBuilder forAddress(BusAddress _address)
      Use the given address to create the connection (e.g. used for remote TCP connected DBus daemons).
      Parameter:
      _address - address to use
      Gibt zurück:
      this
      Seit:
      4.2.0 - 2022-07-18
    • withRegisterSelf

      public DBusConnectionBuilder withRegisterSelf(boolean _register)
      Register the new connection on DBus using 'hello' message. Default is true.
      Parameter:
      _register - boolean
      Gibt zurück:
      this
    • withShared

      public DBusConnectionBuilder withShared(boolean _shared)
      Use this connection as shared connection. Shared connection means that the same connection is used multiple times if the connection parameter did not change. Default is true.
      Parameter:
      _shared - boolean
      Gibt zurück:
      this
    • build

      public DBusConnection build() throws DBusException
      Create the new DBusConnection.
      Angegeben von:
      build in Klasse BaseConnectionBuilder<DBusConnectionBuilder,DBusConnection>
      Gibt zurück:
      DBusConnection
      Löst aus:
      DBusException - when DBusConnection could not be opened
    • getSystemEndianness

      @Deprecated(forRemoval=true, since="4.2.0") public static byte getSystemEndianness()
      Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.
      Get the default system endianness.
      Gibt zurück:
      LITTLE or BIG