Modul org.freedesktop.dbus
Klasse TransportBuilder
java.lang.Object
org.freedesktop.dbus.connections.transports.TransportBuilder
Builder to create transports of different types.
- Seit:
- v4.0.0 - 2021-09-17
- Autor:
- hypfvieh
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic enum
Represents supported SASL authentication modes. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuild()
Create the transport with the previously provided configuration.Returns the configuration builder to configure the transport.static TransportBuilder
create()
Creates a newTransportBuilder
instance using a empty transport configuration.static TransportBuilder
Creates a newTransportBuilder
instance with the given address.static TransportBuilder
create
(BusAddress _address) Creates a newTransportBuilder
instance with the given address.static TransportBuilder
create
(TransportConfig _config) Creates a newTransportBuilder
instance using the given configuration.static String
createDynamicSession
(String _busType, boolean _listeningAddress) Creates a new dynamic bus address for the given bus type.static TransportBuilder
createWithDynamicSession
(String _transportType) Creates a newTransportBuilder
with a dynamically created address.The currently configured BusAddress.Returns aList
of all bustypes supported in the current runtime.
-
Methodendetails
-
create
Creates a newTransportBuilder
instance with the given address.- Parameter:
_address
- address, never null- Gibt zurück:
- new
TransportBuilder
- Löst aus:
InvalidBusAddressException
- if invalid address provided
-
create
Creates a newTransportBuilder
instance using the given configuration.- Parameter:
_config
- config, never null- Gibt zurück:
- new
TransportBuilder
- Löst aus:
InvalidBusAddressException
- if invalid address provided
-
create
Creates a newTransportBuilder
instance using a empty transport configuration.- Gibt zurück:
- new
TransportBuilder
-
create
Creates a newTransportBuilder
instance with the given address.- Parameter:
_address
- address, never null- Gibt zurück:
- new
TransportBuilder
- Löst aus:
DBusException
- if invalid address provided
-
createWithDynamicSession
Creates a newTransportBuilder
with a dynamically created address.- Parameter:
_transportType
- type of session (e.g. UNIX or TCP)- Gibt zurück:
TransportBuilder
- Löst aus:
DBusException
- when invalid/unknown/unsupported transport type given
-
configure
public TransportConfigBuilder<TransportConfigBuilder<?,TransportBuilder>, configure()TransportBuilder> Returns the configuration builder to configure the transport.- Gibt zurück:
- TransportConfigBuilder
-
build
Create the transport with the previously provided configuration.If autoconnect is enabled and this is a client connection, the connection will be established automatically. Establishing the connection will be retried several times to allow connection in concurrent setups. The max retry attempts are calculated by using the configured connection timeout (default: 10000 millis) divided by 500. The minimum of retries is 1.
Without autoconnect, the connection will not be started and has to be started by calling
connect()
on the connection instance. In that case there are no automatic reconnection attempts.- Gibt zurück:
AbstractTransport
instance- Löst aus:
DBusException
- when creating transport failsIOException
- when autoconnect is true, connection is not a listening connection and connection to DBus failed
-
getAddress
The currently configured BusAddress.- Gibt zurück:
BusAddress
-
getRegisteredBusTypes
Returns aList
of all bustypes supported in the current runtime.- Gibt zurück:
List
, maybe empty
-
createDynamicSession
Creates a new dynamic bus address for the given bus type.- Parameter:
_busType
- bus type (e.g. UNIX or TCP), never null_listeningAddress
- true if a listening (server) address should be created, false otherwise- Gibt zurück:
- String containing BusAddress or null
-