Interface PluginFactory

  • 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 interface PluginFactory
    A functional interface representing a factory for creating Plugin instances.

    This is typically used in scenarios where plugin instantiation needs to be deferred or customized, potentially based on configuration or context available at runtime. Implementations might handle loading WASM modules, configuring builders, and returning the ready-to-use plugin.

    • Method Detail

      • create

        Plugin create()
               throws Exception
        Creates and returns a new Plugin instance. Implementations are responsible for all necessary setup, including potentially loading the WASM module and configuring it using Plugin.builder(com.dylibso.chicory.wasm.WasmModule).
        Returns:
        A newly created Plugin instance.
        Throws:
        Exception - If any error occurs during plugin creation (e.g., file loading, WASM instantiation, initialization errors within the plugin's start lifecycle).