Class DebugControllerDBus.Builder<B extends DebugControllerDBus.Builder<B>>

java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gio.DebugControllerDBus.Builder<B>
Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
DebugController.Builder<B>, BuilderInterface
Enclosing class:
DebugControllerDBus

public static class DebugControllerDBus.Builder<B extends DebugControllerDBus.Builder<B>> extends GObject.Builder<B> implements DebugController.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
2.72
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public DebugControllerDBus build()
      Finish building the DebugControllerDBus object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to DebugControllerDBus.
      Overrides:
      build in class GObject.Builder<B extends DebugControllerDBus.Builder<B>>
      Returns:
      a new instance of DebugControllerDBus with the properties that were set in the Builder object.
    • setConnection

      public B setConnection(DBusConnection connection)

      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 the connection property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.72
    • onAuthorize

      public B onAuthorize(DebugControllerDBus.AuthorizeCallback handler)

      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 return false, 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
      Since:
      2.72
      See Also: