Package org.gnome.soup
Interface Message.AuthenticateCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
Message
- 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
AuthenticateCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Emitted when the message requires authentication.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, int)
method.default int
upcall
(MemorySegment sourceMessage, MemorySegment auth, int retrying) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted when the message requires authentication.If credentials are available call
Auth.authenticate(java.lang.String, java.lang.String)
onauth
. If these credentials fail, the signal will be emitted again, withretrying
set totrue
, which will continue until you return without callingAuth.authenticate(java.lang.String, java.lang.String)
onauth
.Note that this may be emitted before
msg
's body has been fully read.You can authenticate
auth
asynchronously by callingGObject.ref()
onauth
and returningtrue
. The operation will complete once eitherAuth.authenticate(java.lang.String, java.lang.String)
orAuth.cancel()
are called. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.soup.Auth, boolean)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, int)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-