java.lang.Object
org.freedesktop.dbus.bin.EmbeddedDBusDaemon
- Alle implementierten Schnittstellen:
Closeable,AutoCloseable
Simple DBusDaemon implementation to use if no DBusDaemon is running on the OS level.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungEmbeddedDBusDaemon(String _address) EmbeddedDBusDaemon(BusAddress _address) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidclose()Shutdown the running DBusDaemon instance.The currently configuredTransportBuilder.SaslAuthMode.booleanWhether the DBusDaemon is still running.voidsetSaslAuthMode(TransportBuilder.SaslAuthMode _saslAuthMode) Use this to override the default authentication mode which would be used by the transport based on theBusAddress.voidsetUnixSocketGroup(String _group) The file group for the created unix socket.
Ignored if TCP is used.
Will only work if currently running JVM process user has suitable permissions to change the group.voidsetUnixSocketOwner(String _owner) The file owner for the created unix socket.
Ignored if TCP is used.
Will only work if currently running JVM process user has suitable permissions to change the owner.voidsetUnixSocketPermissions(PosixFilePermission... _permissions) The file permissions for the created unix socket.
Ignored if TCP is used or if the OS is Windows.
Will only work if currently running JVM process user has suitable permissions to change the permissions.voidStart the DBusDaemon in background and returns immediately.voidstartInBackgroundAndWait(long _maxWaitMillis) Starts the DBusDaemon in background.voidRun the DBusDaemon in foreground.
-
Konstruktordetails
-
EmbeddedDBusDaemon
-
EmbeddedDBusDaemon
- Löst aus:
DBusException
-
-
Methodendetails
-
close
Shutdown the running DBusDaemon instance.- Angegeben von:
closein SchnittstelleAutoCloseable- Angegeben von:
closein SchnittstelleCloseable- Löst aus:
IOException
-
startInForeground
public void startInForeground()Run the DBusDaemon in foreground.This is a blocking operation.
-
startInBackground
public void startInBackground()Start the DBusDaemon in background and returns immediately.This method may return before the background thread is ready. To ensure the the background thread is running on return use
startInBackgroundAndWait(long). -
startInBackgroundAndWait
public void startInBackgroundAndWait(long _maxWaitMillis) Starts the DBusDaemon in background.Will wait up to the given period of milliseconds for the background thread to get ready. If given wait time exceeded, a
RuntimeExceptionis thrown.- Parameter:
_maxWaitMillis- maximum wait time in milliseconds
-
isRunning
public boolean isRunning()Whether the DBusDaemon is still running.- Gibt zurück:
- true if running, false otherwise
-
getSaslAuthMode
The currently configuredTransportBuilder.SaslAuthMode. When null is returned, theTransportBuilder.SaslAuthModeof the transport provider is used.- Gibt zurück:
TransportBuilder.SaslAuthModeor null
-
setSaslAuthMode
Use this to override the default authentication mode which would be used by the transport based on theBusAddress.- Parameter:
_saslAuthMode- auth mode, null to use default
-
setUnixSocketOwner
The file owner for the created unix socket.
Ignored if TCP is used.
Will only work if currently running JVM process user has suitable permissions to change the owner.- Parameter:
_owner- owner to set
-
setUnixSocketGroup
The file group for the created unix socket.
Ignored if TCP is used.
Will only work if currently running JVM process user has suitable permissions to change the group.- Parameter:
_group- group to set
-
setUnixSocketPermissions
The file permissions for the created unix socket.
Ignored if TCP is used or if the OS is Windows.
Will only work if currently running JVM process user has suitable permissions to change the permissions.- Parameter:
_permissions- permissions to set
-