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
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumRepresents 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 TransportBuildercreate()Creates a newTransportBuilderinstance using a empty transport configuration.static TransportBuilderCreates a newTransportBuilderinstance with the given address.static TransportBuildercreate(BusAddress _address) Creates a newTransportBuilderinstance with the given address.static TransportBuildercreate(TransportConfig _config) Creates a newTransportBuilderinstance using the given configuration.static StringcreateDynamicSession(String _busType, boolean _listeningAddress) Creates a new dynamic bus address for the given bus type.static TransportBuildercreateWithDynamicSession(String _transportType) Creates a newTransportBuilderwith a dynamically created address.The currently configured BusAddress.Returns aListof all bustypes supported in the current runtime.
-
Methodendetails
-
create
Creates a newTransportBuilderinstance 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 newTransportBuilderinstance 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 newTransportBuilderinstance using a empty transport configuration.- Gibt zurück:
- new
TransportBuilder
-
create
Creates a newTransportBuilderinstance 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 newTransportBuilderwith 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:
AbstractTransportinstance- 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 aListof 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
-