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 TypeMethodDescriptionvoid
Emitted when the connection is closed.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment sourceDBusConnection, int remotePeerVanished, MemorySegment error) Theupcall
method 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
remotePeerVanished
is set tofalse
anderror
isnull
.
- If the remote peer closes the connection. In this case
remotePeerVanished
is set totrue
anderror
is set.
- If the remote peer sends invalid or malformed data. In this
case
remotePeerVanished
is set tofalse
anderror
is set.
Upon receiving this signal, you should give up your reference to
connection
. You are guaranteed that this signal is emitted only once. - If g_dbus_connection_close() is called. In this case
-
upcall
default void upcall(MemorySegment sourceDBusConnection, int remotePeerVanished, MemorySegment error) Theupcall
method 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:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-