Class DBusInterfaceSkeleton.Builder<B extends DBusInterfaceSkeleton.Builder<B>>

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

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

    • Builder

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

    • build

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

      public B setGFlags(Set<DBusInterfaceSkeletonFlags> gFlags)
      Flags from the GDBusInterfaceSkeletonFlags enumeration.
      Parameters:
      gFlags - the value for the g-flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setGFlags

      public B setGFlags(DBusInterfaceSkeletonFlags... gFlags)
      Flags from the GDBusInterfaceSkeletonFlags enumeration.
      Parameters:
      gFlags - the value for the g-flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • onGAuthorizeMethod

      public B onGAuthorizeMethod(DBusInterfaceSkeleton.GAuthorizeMethodCallback handler)

      Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized.

      Note that this signal is emitted in a thread dedicated to handling the method call so handlers are allowed to perform blocking IO. This means that it is appropriate to call e.g. polkit_authority_check_authorization_sync() with the POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION flag set.

      If false is returned then no further handlers are run and the signal handler must take a reference to invocation and finish handling the call (e.g. return an error via g_dbus_method_invocation_return_error()).

      Otherwise, if true is returned, signal emission continues. If no handlers return false, then the method is dispatched. If interface_ has an enclosing GDBusObjectSkeleton, then the GDBusObjectSkeleton::authorize-method signal handlers run before the handlers for this signal.

      The default class handler just returns true.

      Please note that the common case is optimized: if no signals handlers are connected and the default class handler isn't overridden (for both interface_ and the enclosing GDBusObjectSkeleton, if any) and GDBusInterfaceSkeleton:g-flags does not have the DBusInterfaceSkeletonFlags.HANDLE_METHOD_INVOCATIONS_IN_THREAD flags set, no dedicated thread is ever used and the call will be handled in the same thread as the object that interface_ belongs to was exported in.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
      See Also: