Package io.polywrap.plugin
Class PluginModule
-
- All Implemented Interfaces:
public abstract class PluginModule<TConfig extends Object>An abstract class for plugin modules with a generic configuration type TConfig. This class is extended by the generated plugin module class.
-
-
Constructor Summary
Constructors Constructor Description PluginModule(TConfig config)
-
Method Summary
Modifier and Type Method Description abstract Map<String, SuspendFunction3<ByteArray, ByteArray, Invoker, ByteArray>>getMethods()An abstract property representing a map of method names to their corresponding PluginMethod instances. final TConfiggetConfig()The configuration object for the plugin module. final Result<ByteArray>wrapInvoke(String method, ByteArray args, ByteArray env, Invoker invoker)Invokes a method of the plugin module. -
-
Constructor Detail
-
PluginModule
PluginModule(TConfig config)
-
-
Method Detail
-
getMethods
abstract Map<String, SuspendFunction3<ByteArray, ByteArray, Invoker, ByteArray>> getMethods()
An abstract property representing a map of method names to their corresponding PluginMethod instances.
-
wrapInvoke
final Result<ByteArray> wrapInvoke(String method, ByteArray args, ByteArray env, Invoker invoker)
Invokes a method of the plugin module.
- Parameters:
method- The name of the method to invoke.args- The input arguments as a byte array.env- The environment as a byte array.invoker- The Invoker instance to be used during the invocation.
-
-
-
-