Package dev.openfunction.functions
Interface Plugin
-
public interface Plugin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ErrorexecPostHook(Context ctx)execPreHook executes a hook after the function called.java.lang.ErrorexecPreHook(Context ctx)execPreHook executes a hook before the function called.java.lang.ObjectgetField(java.lang.String fieldName)get return the value of the fieldName`Plugininit()init will create a new plugin, and execute hook in this calling.java.lang.Stringname()name return the name of this plugin.java.lang.Stringversion()version return the version of this plugin.
-
-
-
Method Detail
-
name
java.lang.String name()
name return the name of this plugin.- Returns:
- Plugin name
-
version
java.lang.String version()
version return the version of this plugin.- Returns:
- Plugin name
-
init
Plugin init()
init will create a new plugin, and execute hook in this calling. If you do not want to use a new plugin to execute hook, just return `nil`.- Returns:
- Plugin
-
execPreHook
java.lang.Error execPreHook(Context ctx)
execPreHook executes a hook before the function called.- Parameters:
ctx- Runtime context- Returns:
- error
-
execPostHook
java.lang.Error execPostHook(Context ctx)
execPreHook executes a hook after the function called.- Parameters:
ctx- Runtime context- Returns:
- error
-
getField
java.lang.Object getField(java.lang.String fieldName)
get return the value of the fieldName`- Parameters:
fieldName- Name of member- Returns:
- Object
-
-