Interface EngineProvider


public interface EngineProvider
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default Optional<Class<? extends ai.tegmentum.webassembly4j.api.config.EngineConfig>>
    The concrete EngineConfig subtype this provider accepts, if any.
    ai.tegmentum.webassembly4j.api.Engine
    create(ai.tegmentum.webassembly4j.api.config.WebAssemblyConfig config)
     
     
    default boolean
    supports(ai.tegmentum.webassembly4j.api.config.EngineConfig engineConfig)
     
    validate(ai.tegmentum.webassembly4j.api.config.WebAssemblyConfig config)
     
  • Method Details

    • descriptor

      ProviderDescriptor descriptor()
    • availability

      ProviderAvailability availability()
    • configType

      default Optional<Class<? extends ai.tegmentum.webassembly4j.api.config.EngineConfig>> configType()
      The concrete EngineConfig subtype this provider accepts, if any.

      Returning a non-empty value lets the SPI's default supports(EngineConfig) and validate(WebAssemblyConfig) implementations reject mismatched config automatically, and lets tooling discover which builder a user should reach for. Providers with no engine-specific config (e.g. GraalWasm) return Optional.empty().

    • validate

      default ValidationResult validate(ai.tegmentum.webassembly4j.api.config.WebAssemblyConfig config)
    • supports

      default boolean supports(ai.tegmentum.webassembly4j.api.config.EngineConfig engineConfig)
    • create

      ai.tegmentum.webassembly4j.api.Engine create(ai.tegmentum.webassembly4j.api.config.WebAssemblyConfig config)