Interface Message.RequestCertificateCallback
- 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.
@FunctionalInterface
public static interface Message.RequestCertificateCallback
extends FunctionPointer
Functional interface declaration of the RequestCertificateCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(@Nullable TlsClientConnection tlsConnection) Emitted during themsg'sconnection TLS handshake whentlsConnectionrequests a certificate from the client.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, MemorySegment)method.default intupcall(MemorySegment sourceMessage, MemorySegment tlsConnection) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted during the
msg'sconnection TLS handshake whentlsConnectionrequests a certificate from the client.You can set the client certificate by calling
Message.setTlsClientCertificate(TlsCertificate)and returningtrue. It's possible to handle the request asynchornously by returningtrueand callMessage.setTlsClientCertificate(TlsCertificate)later once the certificate is available. Note that this signal is not emitted ifSession:tls-interactionwas set, or ifMessage.setTlsClientCertificate(TlsCertificate)was called before the connection TLS handshake started. -
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(TlsClientConnection)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-