1414import java .util .function .Function ;
1515
1616/**
17- * Represents an instantiated Proxy-WASM plugin, providing the bridge between the host
17+ * Represents a Proxy-WASM plugin, providing the bridge between the host
1818 * environment and the WASM module.
1919 *
20- * <p>This abstract class defines the core structure and lifecycle of a plugin.
21- * Concrete plugin instances are created using the {@link Builder}.
20+ * <p>Concrete Plugin instances are created using the {@link Builder}.
2221 * The actual WASM instance and interaction logic are managed internally.
2322 */
24- public abstract class Plugin {
25-
26- /**
27- * Protected constructor for subclasses.
28- */
29- protected Plugin () {}
23+ public interface Plugin {
3024
3125 /**
3226 * Returns the configured name of this plugin instance.
3327 *
3428 * @return the plugin name, which might be null if not explicitly set via the builder.
3529 */
36- public abstract String name ();
30+ String name ();
3731
3832 /**
3933 * Creates a new {@link Builder} to configure and construct a {@link Plugin} instance
@@ -42,14 +36,14 @@ protected Plugin() {}
4236 * @param module the compiled {@link WasmModule} representing the plugin's code.
4337 * @return a new {@link Plugin.Builder} instance.
4438 */
45- public static Plugin .Builder builder (WasmModule module ) {
39+ static Plugin .Builder builder (WasmModule module ) {
4640 return new Plugin .Builder (module );
4741 }
4842
4943 /**
5044 * Builder for creating a Plugin instance.
5145 */
52- public static final class Builder {
46+ final class Builder {
5347
5448 private final WasmModule module ;
5549 private final ProxyWasm .Builder proxyWasmBuilder = ProxyWasm .builder ().withStart (false );
0 commit comments