Package io.roastedroot.proxywasm
Class Plugin
- java.lang.Object
-
- io.roastedroot.proxywasm.Plugin
-
public abstract class Plugin extends Object
Represents an instantiated Proxy-WASM plugin, providing the bridge between the host environment and the WASM module.This abstract class defines the core structure and lifecycle of a plugin. Concrete plugin instances are created using the
Plugin.Builder
. The actual WASM instance and interaction logic are managed internally.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Plugin.Builder
Builder for creating a Plugin instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Plugin()
Protected constructor for subclasses.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Plugin.Builder
builder(WasmModule module)
Creates a newPlugin.Builder
to configure and construct aPlugin
instance from the given WASM module.abstract String
name()
Returns the configured name of this plugin instance.
-
-
-
Method Detail
-
name
public abstract String name()
Returns the configured name of this plugin instance.- Returns:
- the plugin name, which might be null if not explicitly set via the builder.
-
builder
public static Plugin.Builder builder(WasmModule module)
Creates a newPlugin.Builder
to configure and construct aPlugin
instance from the given WASM module.- Parameters:
module
- the compiledWasmModule
representing the plugin's code.- Returns:
- a new
Plugin.Builder
instance.
-
-