Class DBusObjectManagerClient.Builder<B extends DBusObjectManagerClient.Builder<B>>

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

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

      public B setBusType(BusType busType)
      If this property is not BusType.NONE, then GDBusObjectManagerClient:connection must be null and will be set to the GDBusConnection obtained by calling g_bus_get() with the value of this property.
      Parameters:
      busType - the value for the bus-type property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setConnection

      public B setConnection(DBusConnection connection)
      The GDBusConnection to use.
      Parameters:
      connection - the value for the connection property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setFlags

      public B setFlags(Set<DBusObjectManagerClientFlags> flags)
      Flags from the GDBusObjectManagerClientFlags enumeration.
      Parameters:
      flags - the value for the flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setGetProxyTypeDestroyNotify

      public B setGetProxyTypeDestroyNotify(MemorySegment getProxyTypeDestroyNotify)
      A GDestroyNotify for the gpointer user_data in GDBusObjectManagerClient:get-proxy-type-user-data.
      Parameters:
      getProxyTypeDestroyNotify - the value for the get-proxy-type-destroy-notify property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setGetProxyTypeFunc

      public B setGetProxyTypeFunc(MemorySegment getProxyTypeFunc)
      The GDBusProxyTypeFunc to use when determining what GType to use for interface proxies or null.
      Parameters:
      getProxyTypeFunc - the value for the get-proxy-type-func property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setGetProxyTypeUserData

      public B setGetProxyTypeUserData(MemorySegment getProxyTypeUserData)
      The gpointer user_data to pass to GDBusObjectManagerClient:get-proxy-type-func.
      Parameters:
      getProxyTypeUserData - the value for the get-proxy-type-user-data property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setName

      public B setName(String name)
      The well-known name or unique name that the manager is for.
      Parameters:
      name - the value for the name property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setObjectPath

      public B setObjectPath(String objectPath)
      The object path the manager is for.
      Parameters:
      objectPath - the value for the object-path property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • setFlags

      public B setFlags(DBusObjectManagerClientFlags... flags)
      Flags from the GDBusObjectManagerClientFlags enumeration.
      Parameters:
      flags - the value for the flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.30
    • onInterfaceProxyPropertiesChanged

      public B onInterfaceProxyPropertiesChanged(DBusObjectManagerClient.InterfaceProxyPropertiesChangedCallback handler)

      Emitted when one or more D-Bus properties on proxy changes. The local cache has already been updated when this signal fires. Note that both changedProperties and invalidatedProperties are guaranteed to never be null (either may be empty though).

      This signal exists purely as a convenience to avoid having to connect signals to all interface proxies managed by manager.

      This signal is emitted in the thread-default main context (see MainContext#pushThreadDefault) that manager was constructed in.

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

      public B onInterfaceProxySignal(DBusObjectManagerClient.InterfaceProxySignalCallback handler)

      Emitted when a D-Bus signal is received on interfaceProxy.

      This signal exists purely as a convenience to avoid having to connect signals to all interface proxies managed by manager.

      This signal is emitted in the thread-default main context (see MainContext#pushThreadDefault) that manager was constructed in.

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