Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mscript_impl_example [2020/04/26 03:33] – external edit 127.0.0.1mscript_impl_example [2020/05/10 16:04] (current) – removed admin
Line 1: Line 1:
-==== MScript Impl Java Class Example ==== 
-Compile this java class using //javac// or your IDE and package it into a jar file and copy it to //lib// folder. Restart TestOptimal. 
- 
-  public class MyMScriptMethodClass { 
-     private MbtScriptExecutor scriptExec; 
-       // Required constructure of the exact signature! 
-       public MyMScriptMethodClass(MbtScriptExecutor scriptExec_p) { 
-           scriptExec = scriptExec_p; 
-           // add your initialization code here. 
-           System.out.println("# of plugins activated: " + scriptExec_p.getPluginList().size()); 
-       } 
-       public String myMethod_1() { 
-           System.out.println ("myMethod_1 called"); 
-           return "myMethod_1 OK"; 
-       } 
-       public String myMethod_2(String ... params_p) { 
-           System.out.println ("myMethod_2 called with params " + params_p.toString()); 
-           return "myMethod_2 OK"; 
-       } 
-       public void close() { 
-           System.out.println ("closing MyMScriptMethodClass"); 
-       } 
-  } 
-