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 TypeMethodDescriptionbooleanEmitted when the message requires authentication.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, int)method.default intupcall(MemorySegment sourceMessage, MemorySegment auth, int retrying) Theupcallmethod 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, withretryingset 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'sbody has been fully read.You can authenticate
authasynchronously by callingGObject.ref()onauthand returningtrue. The operation will complete once eitherAuth.authenticate(java.lang.String, java.lang.String)orAuth.cancel()are called. -
upcall
Theupcallmethod 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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-