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 TypeMethodDescriptionvoid
run
(HSTSPolicy oldPolicy, HSTSPolicy newPolicy) Emitted whenhstsEnforcer
changes.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment sourceHSTSEnforcer, MemorySegment oldPolicy, MemorySegment newPolicy) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted whenhstsEnforcer
changes.If a policy has been added,
newPolicy
will contain the newly-added policy andoldPolicy
will benull
. If a policy has been deleted,oldPolicy
will contain the to-be-deleted policy andnewPolicy
will benull
. If a policy has been changed,oldPolicy
will contain its old value, andnewPolicy
its 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) Theupcall
method 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:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-