Package org.gnome.soup
Interface HSTSEnforcer.ChangedCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
HSTSEnforcer
- 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
ChangedCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidrun(@Nullable HSTSPolicy oldPolicy, @Nullable HSTSPolicy newPolicy) Emitted whenhstsEnforcerchanges.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default voidupcall(MemorySegment sourceHSTSEnforcer, MemorySegment oldPolicy, MemorySegment newPolicy) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted whenhstsEnforcerchanges.If a policy has been added,
newPolicywill contain the newly-added policy andoldPolicywill benull. If a policy has been deleted,oldPolicywill contain the to-be-deleted policy andnewPolicywill benull. If a policy has been changed,oldPolicywill contain its old value, andnewPolicyits new value.Note that you shouldn't modify the policies from a callback to this signal.
-
upcall
default void upcall(MemorySegment sourceHSTSEnforcer, MemorySegment oldPolicy, MemorySegment newPolicy) Theupcallmethod is called from native code. The parameters are marshaled andrun(org.gnome.soup.HSTSPolicy, org.gnome.soup.HSTSPolicy)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-