Class DBusObjectSkeleton

All Implemented Interfaces:
DBusObject, Proxy

@Generated("org.javagi.JavaGI") public class DBusObjectSkeleton extends GObject implements DBusObject

A GDBusObjectSkeleton instance is essentially a group of D-Bus interfaces. The set of exported interfaces on the object may be dynamic and change at runtime.

This type is intended to be used with DBusObjectManager.

Since:
2.30
  • Constructor Details

    • DBusObjectSkeleton

      public DBusObjectSkeleton(MemorySegment address)
      Create a DBusObjectSkeleton instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • DBusObjectSkeleton

      public DBusObjectSkeleton(String objectPath)
      Creates a new GDBusObjectSkeleton.
      Parameters:
      objectPath - An object path.
      Since:
      2.30
    • DBusObjectSkeleton

      public DBusObjectSkeleton()
      Create a new DBusObjectSkeleton.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the DBusObjectSkeleton class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected DBusObjectSkeleton asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • addInterface

      public void addInterface(DBusInterfaceSkeleton interface_)

      Adds interface_ to object.

      If this DBusObjectSkeleton already contains a GDBusInterfaceSkeleton with the same interface name, it is removed before interface_ is added.

      Note that this DBusObjectSkeleton takes its own reference on interface_ and holds it until removed.

      Parameters:
      interface_ - A GDBusInterfaceSkeleton.
      Since:
      2.30
    • flush

      public void flush()
      This method simply calls g_dbus_interface_skeleton_flush() on all interfaces belonging to object. See that method for when flushing is useful.
      Since:
      2.30
    • removeInterface

      public void removeInterface(DBusInterfaceSkeleton interface_)
      Removes interface_ from object.
      Parameters:
      interface_ - A GDBusInterfaceSkeleton.
      Since:
      2.30
    • removeInterfaceByName

      public void removeInterfaceByName(String interfaceName)

      Removes the GDBusInterface with interfaceName from object.

      If no D-Bus interface of the given interface exists, this function does nothing.

      Parameters:
      interfaceName - A D-Bus interface name.
      Since:
      2.30
    • setObjectPath

      public void setObjectPath(String objectPath)
      Sets the object path for object.
      Parameters:
      objectPath - A valid D-Bus object path.
      Since:
      2.30
    • authorizeMethod

      protected boolean authorizeMethod(DBusInterfaceSkeleton interface_, DBusMethodInvocation invocation)
      Signal class handler for the GDBusObjectSkeleton::authorize-method signal.
    • onAuthorizeMethod

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

      This signal is like GDBusInterfaceSkeleton's GDBusInterfaceSkeleton::g-authorize-method signal, except that it is for the enclosing object.

      The default class handler just returns true.

      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      Since:
      2.30
      See Also:
    • emitAuthorizeMethod

      public boolean emitAuthorizeMethod(@Nullable DBusInterfaceSkeleton interface_, @Nullable DBusMethodInvocation invocation)
      Emits the "authorize-method" signal. See onAuthorizeMethod(DBusObjectSkeleton.AuthorizeMethodCallback).
    • builder

      public static DBusObjectSkeleton.Builder<? extends DBusObjectSkeleton.Builder> builder()
      A DBusObjectSkeleton.Builder object constructs a DBusObjectSkeleton with the specified properties. Use the various set...() methods to set properties, and finish construction with DBusObjectSkeleton.Builder.build().
      Returns:
      the builder object