Class ProcessSandboxFactory

java.lang.Object
com.tnsai.quality.sandbox.ProcessSandboxFactory
All Implemented Interfaces:
SandboxFactory

public final class ProcessSandboxFactory extends Object implements SandboxFactory
Default SandboxFactory that backs sandboxes with the JVM's ProcessBuilder (TNS-296). Lowest priority, available on every host — the portable fallback that ships with the framework.
Since:
0.10.0 (TNS-296)
  • Constructor Details

    • ProcessSandboxFactory

      public ProcessSandboxFactory()
  • Method Details

    • id

      public String id()
      Description copied from interface: SandboxFactory
      Stable backend identifier ("process", "container", "wasm", "firecracker", …). Used by callers pinning a specific backend.
      Specified by:
      id in interface SandboxFactory
    • priority

      public int priority()
      Lowest priority — anything stronger (container, microVM, WASM) outranks.
      Specified by:
      priority in interface SandboxFactory
    • available

      public boolean available()
      Always available — the JVM is the runtime.
      Specified by:
      available in interface SandboxFactory
    • create

      public Sandbox create(SandboxSpec spec)
      Description copied from interface: SandboxFactory
      Create a Sandbox from spec. Implementations MUST reject specs they cannot honour (e.g. a backend that doesn't support NetPolicy.AllowList throws here rather than silently downgrading) — silent relaxation is the accidental-blast-radius footgun this layer exists to prevent.
      Specified by:
      create in interface SandboxFactory