Class DebugControllerDBus.Builder<B extends DebugControllerDBus.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,DebugController.Builder<B>
- Enclosing class:
DebugControllerDBus
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theDebugControllerDBus
object.Emitted when a D-Bus peer is trying to change the debug settings and used to determine if that is authorized.setConnection
(DBusConnection connection) The D-Bus connection to expose the debugging interface on.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
Methods inherited from interface org.gnome.gio.DebugController.Builder
setDebugEnabled
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theDebugControllerDBus
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toDebugControllerDBus
.- Overrides:
build
in classGObject.Builder<B extends DebugControllerDBus.Builder<B>>
- Returns:
- a new instance of
DebugControllerDBus
with the properties that were set in the Builder object.
-
setConnection
The D-Bus connection to expose the debugging interface on.Typically this will be the same connection (to the system or session bus) which the rest of the application or service’s D-Bus objects are registered on.
- Parameters:
connection
- the value for theconnection
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onAuthorize
Emitted when a D-Bus peer is trying to change the debug settings and used to determine if that is authorized.This signal is emitted in a dedicated worker thread, so handlers are allowed to perform blocking I/O. This means that, for example, it is appropriate to call
polkit_authority_check_authorization_sync()
to check authorization using polkit.If
false
is returned then no further handlers are run and the request to change the debug settings is rejected.Otherwise, if
true
is returned, signal emission continues. If no handlers returnfalse
, then the debug settings are allowed to be changed.Signal handlers must not modify
invocation
, or cause it to return a value.The default class handler just returns
true
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-