Class HSTSEnforcerDB

All Implemented Interfaces:
SessionFeature, Proxy

@Generated("org.javagi.JavaGI") public final class HSTSEnforcerDB extends HSTSEnforcer implements SessionFeature

Persistent HTTP Strict Transport Security enforcer.

HSTSEnforcerDB is a HSTSEnforcer that uses a SQLite database as a backend for persistency.

  • Constructor Details

    • HSTSEnforcerDB

      public HSTSEnforcerDB(MemorySegment address)
      Create a HSTSEnforcerDB instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • HSTSEnforcerDB

      public HSTSEnforcerDB(String filename)

      Creates a HSTSEnforcerDB.

      filename will be read in during the initialization of a HSTSEnforcerDB, in order to create an initial set of HSTS policies. If the file doesn't exist, a new database will be created and initialized. Changes to the policies during the lifetime of a HSTSEnforcerDB will be written to filename when HSTSEnforcer::changed is emitted.

      Parameters:
      filename - the filename of the database to read/write from.
    • HSTSEnforcerDB

      public HSTSEnforcerDB()
      Create a new HSTSEnforcerDB.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the HSTSEnforcerDB class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected HSTSEnforcerDB asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class HSTSEnforcer
      Returns:
      the instance as if it were its parent type
    • builder

      public static HSTSEnforcerDB.Builder<? extends HSTSEnforcerDB.Builder> builder()
      A HSTSEnforcerDB.Builder object constructs a HSTSEnforcerDB with the specified properties. Use the various set...() methods to set properties, and finish construction with HSTSEnforcerDB.Builder.build().
      Returns:
      the builder object