Class DBusInterfaceSkeleton.Builder<B extends DBusInterfaceSkeleton.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
DBusInterfaceSkeleton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theDBusInterfaceSkeletonobject.Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized.setGFlags(Set<DBusInterfaceSkeletonFlags> gFlags) Flags from theGDBusInterfaceSkeletonFlagsenumeration.setGFlags(DBusInterfaceSkeletonFlags... gFlags) Flags from theGDBusInterfaceSkeletonFlagsenumeration.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theDBusInterfaceSkeletonobject. 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 toDBusInterfaceSkeleton.- Overrides:
buildin classGObject.Builder<B extends DBusInterfaceSkeleton.Builder<B>>- Returns:
- a new instance of
DBusInterfaceSkeletonwith the properties that were set in the Builder object.
-
setGFlags
Flags from theGDBusInterfaceSkeletonFlagsenumeration.- Parameters:
gFlags- the value for theg-flagsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.30
-
setGFlags
Flags from theGDBusInterfaceSkeletonFlagsenumeration.- Parameters:
gFlags- the value for theg-flagsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.30
-
onGAuthorizeMethod
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
falseis returned then no further handlers are run and the signal handler must take a reference toinvocationand finish handling the call (e.g. return an error via g_dbus_method_invocation_return_error()).Otherwise, if
trueis returned, signal emission continues. If no handlers returnfalse, then the method is dispatched. Ifinterface_has an enclosingGDBusObjectSkeleton, then theGDBusObjectSkeleton::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 enclosingGDBusObjectSkeleton, if any) andGDBusInterfaceSkeleton:g-flags does not have theDBusInterfaceSkeletonFlags.HANDLE_METHOD_INVOCATIONS_IN_THREADflags set, no dedicated thread is ever used and the call will be handled in the same thread as the object thatinterface_belongs to was exported in.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.30
- See Also:
-