public interface ObjectHandler
Modifier and Type | Method and Description |
---|---|
java.lang.String |
call(RiveScript rs,
java.lang.String name,
java.lang.String[] fields)
Handler for when a user invokes the object.
|
void |
load(RiveScript rs,
java.lang.String name,
java.lang.String[] code)
Handler for when object code is read (loaded) by RiveScript.
|
void load(RiveScript rs, java.lang.String name, java.lang.String[] code)
rs
- the reference to the parent RiveScript instancename
- the name of the objectcode
- the source code inside the objectjava.lang.String call(RiveScript rs, java.lang.String name, java.lang.String[] fields)
String
result from the object.
This code is executed when a <call>
tag in a RiveScript reply wants to call your object macro.
rs
- the reference to the parent RiveScript instancename
- the name of the object being calledfields
- the argument list from the call tag