Modul org.freedesktop.dbus
Klasse BaseConnectionBuilder<R extends BaseConnectionBuilder<R,C>,C extends AbstractConnection>
java.lang.Object
org.freedesktop.dbus.connections.impl.BaseConnectionBuilder<R,C>
- Typparameter:
R- concrete type of connection builder
- Bekannte direkte Unterklassen:
DBusConnectionBuilder,DirectConnectionBuilder
public abstract class BaseConnectionBuilder<R extends BaseConnectionBuilder<R,C>,C extends AbstractConnection>
extends Object
Base class for connection builders containing commonly used options.
- Seit:
- 4.2.0 - 2022-07-13
- Autor:
- hypfvieh
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedBaseConnectionBuilder(Class<R> _returnType, BusAddress _address) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungabstract Cbuild()protected ReceivingServiceConfigCreates the configuration to use forReceivingService.protected TransportConfigCreates the configuration to use forTransportBuilder.protected IDisconnectCallbackprotected bytestatic byteGet the default system endianness.protected booleanReturns the builder to configure the receiving thread pools.Returns the builder to configure the used transport.withDisconnectCallback(IDisconnectCallback _disconnectCallback) Set the given disconnect callback to the created connection.withEndianess(byte _endianess) Set the endianess for the connection Default is based on system endianess.withErrorHandlerThreadCount(int _threads) Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withErrorHandlerThreadCount(_threads)withMethodCallThreadCount(int _threads) Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withMethodCallThreadCount(_threads)withMethodReturnThreadCount(int _threads) Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withMethodReturnThreadCount(_threads)withSignalThreadCount(int _threads) Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withSignalThreadCount(_threads)withWeakReferences(boolean _weakRef) Enable/Disable weak references on connection.
-
Konstruktordetails
-
BaseConnectionBuilder
-
-
Methodendetails
-
buildThreadConfig
Creates the configuration to use forReceivingService.- Gibt zurück:
- config
-
buildTransportConfig
Creates the configuration to use forTransportBuilder.- Gibt zurück:
- config
-
isWeakReference
protected boolean isWeakReference() -
getEndianess
protected byte getEndianess() -
getDisconnectCallback
-
receivingThreadConfig
Returns the builder to configure the receiving thread pools.- Gibt zurück:
- builder
-
transportConfig
Returns the builder to configure the used transport.- Gibt zurück:
- builder
-
withSignalThreadCount
Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withSignalThreadCount(_threads)Set the size of the thread-pool used to handle signals from the bus. Caution: Using thread-pool size > 1 may cause signals to be handled out-of-orderDefault: 1
- Parameter:
_threads- int >= 1- Gibt zurück:
- this
-
withErrorHandlerThreadCount
Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withErrorHandlerThreadCount(_threads)Set the size of the thread-pool used to handle error messages received on the bus.Default: 1
- Parameter:
_threads- int >= 1- Gibt zurück:
- this
-
withMethodCallThreadCount
Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withMethodCallThreadCount(_threads)Set the size of the thread-pool used to handle methods calls previously sent to the bus. The thread pool size has to be > 1 to handle recursive calls.Default: 4
- Parameter:
_threads- int >= 1- Gibt zurück:
- this
-
withMethodReturnThreadCount
Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.use receivingThreadConfig().withMethodReturnThreadCount(_threads)Set the size of the thread-pool used to handle method return values received on the bus.Default: 1
- Parameter:
_threads- int >= 1- Gibt zurück:
- this
-
withEndianess
Set the endianess for the connection Default is based on system endianess.- Parameter:
_endianess-Message.Endian.BIGor 0x6c- Gibt zurück:
- this
-
withWeakReferences
Enable/Disable weak references on connection. Default is false.- Parameter:
_weakRef- true to enable- Gibt zurück:
- this
-
withDisconnectCallback
Set the given disconnect callback to the created connection.- Parameter:
_disconnectCallback- callback- Gibt zurück:
- this
-
build
- Löst aus:
DBusException
-
getSystemEndianness
public static byte getSystemEndianness()Get the default system endianness.- Gibt zurück:
- LITTLE or BIG
-