private Long callWASI(final ServerWebExchange exchange,
                          final ShenyuPluginChain chain,
                          final SelectorData selector,
                          final RuleData rule,
                          final Extern doExecute) {
        // WASI cannot easily pass Java objects like JNI, here we pass Long as arg
        // then we can get the argument by Long
        final Long argumentId = getArgumentId(exchange, chain, selector, rule);
        ARGUMENTS.put(argumentId, new Argument(exchange, chain, selector, rule));
        // call WASI function
        WasmFunctions.consumer(wasmLoader.getStore(), doExecute.func(), WasmValType.I64)
                .accept(argumentId);
        ARGUMENTS.remove(argumentId);
        return argumentId;
    }
this is Template Method child has implements your own logic.

@param exchange   exchange the current server exchange {@linkplain ServerWebExchange}
@param chain      chain the current chain  {@linkplain ServerWebExchange}
@param selector   selector    {@linkplain SelectorData}
@param rule       rule    {@linkplain RuleData}
@param argumentId the argument id {@linkplain #getArgumentId}
@return {@code Mono<Void>} to indicate when request handling is complete
shenyu-plugin/shenyu-plugin-wasm-base/src/main/java/org/apache/shenyu/plugin/wasm/base/AbstractShenyuWasmPlugin.java