Interface Message.AcceptCertificateCallback
- 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.AcceptCertificateCallback
extends FunctionPointer
Functional interface declaration of the AcceptCertificateCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(@Nullable TlsCertificate tlsPeerCertificate, Set<TlsCertificateFlags> tlsPeerErrors) Emitted during themsg'sconnection TLS handshake after an unacceptable TLS certificate has been received.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, MemorySegment, int)method.default intupcall(MemorySegment sourceMessage, MemorySegment tlsPeerCertificate, int tlsPeerErrors) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted during the
msg'sconnection TLS handshake after an unacceptable TLS certificate has been received.You can return
trueto accepttlsCertificatedespitetlsErrors. -
upcall
default int upcall(MemorySegment sourceMessage, MemorySegment tlsPeerCertificate, int tlsPeerErrors) Theupcallmethod is called from native code. The parameters are marshaled andrun(TlsCertificate, Set)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, MemorySegment, int)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-