Modul org.freedesktop.dbus
Klasse DBusConnectionBuilder
java.lang.Object
org.freedesktop.dbus.connections.impl.BaseConnectionBuilder<DBusConnectionBuilder,DBusConnection>
org.freedesktop.dbus.connections.impl.DBusConnectionBuilder
public final class DBusConnectionBuilder
extends BaseConnectionBuilder<DBusConnectionBuilder,DBusConnection>
Builder to create a new DBusConnection.
- Version:
- 4.1.0 - 2022-02-04
- Autor:
- hypfvieh
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuild()
Create the newDBusConnection
.static DBusConnectionBuilder
forAddress
(String _address) Use the given address to create the connection (e.g. used for remote TCP connected DBus daemons).static DBusConnectionBuilder
forAddress
(BusAddress _address) Use the given address to create the connection (e.g. used for remote TCP connected DBus daemons).static DBusConnectionBuilder
Create a new default connection connecting to the DBus session bus.static DBusConnectionBuilder
forSessionBus
(String _machineIdFileLocation) Create a new default connection connecting to DBus session bus but use an alternative input for the machineID.static DBusConnectionBuilder
Create new default connection to the DBus system bus.static DBusConnectionBuilder
Create a default connection to DBus using the given bus type.static DBusConnectionBuilder
forType
(DBusConnection.DBusBusType _type, String _machineIdFile) Create a default connection to DBus using the given bus type and machineIdFile.withShared
(boolean _shared) Use this connection as shared connection.Von Klasse geerbte Methoden org.freedesktop.dbus.connections.impl.BaseConnectionBuilder
buildThreadConfig, buildTransportConfig, getDisconnectCallback, getSystemEndianness, isWeakReference, receivingThreadConfig, transportConfig, withDisconnectCallback, withWeakReferences
-
Methodendetails
-
forSessionBus
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
Create new default connection to the DBus system bus.- Gibt zurück:
DBusConnectionBuilder
-
forSessionBus
Create a new default connection connecting to the DBus session bus.- Gibt zurück:
DBusConnectionBuilder
-
forType
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
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
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
-
build
Create the newDBusConnection
.- Angegeben von:
build
in KlasseBaseConnectionBuilder<DBusConnectionBuilder,
DBusConnection> - Gibt zurück:
DBusConnection
- Löst aus:
DBusException
- when DBusConnection could not be opened
-