Package org.gnome.gio
Interface DBusConnection.ClosedCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
DBusConnection
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface declaration of the
ClosedCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidEmitted when the connection is closed.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment)method.default voidupcall(MemorySegment sourceDBusConnection, int remotePeerVanished, MemorySegment error) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted when the connection is closed.The cause of this event can be
- If g_dbus_connection_close() is called. In this case
remotePeerVanishedis set tofalseanderrorisnull.
- If the remote peer closes the connection. In this case
remotePeerVanishedis set totrueanderroris set.
- If the remote peer sends invalid or malformed data. In this
case
remotePeerVanishedis set tofalseanderroris set.
Upon receiving this signal, you should give up your reference to
connection.You are guaranteed that this signal is emitted only once.- Since:
- 2.26
- If g_dbus_connection_close() is called. In this case
-
upcall
default void upcall(MemorySegment sourceDBusConnection, int remotePeerVanished, MemorySegment error) Theupcallmethod is called from native code. The parameters are marshaled andrun(boolean, org.gnome.glib.GError)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-