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.

@FunctionalInterface public static interface HSTSEnforcer.ChangedCallback extends FunctionPointer

Functional interface declaration of the ChangedCallback callback.

See Also:
  • Method Details

    • run

      void run(@Nullable HSTSPolicy oldPolicy, @Nullable HSTSPolicy newPolicy)

      Emitted when hstsEnforcer changes.

      If a policy has been added, newPolicy will contain the newly-added policy and oldPolicy will be null. If a policy has been deleted, oldPolicy will contain the to-be-deleted policy and newPolicy will be null. If a policy has been changed, oldPolicy will contain its old value, and newPolicy 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)
      The upcall method is called from native code. The parameters are marshaled and run(HSTSPolicy, HSTSPolicy) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer