Package org.tn5250j.scripting
Interface InterpreterDriver
-
- All Known Implementing Classes:
JPythonInterpreterDriver
public interface InterpreterDriverDriver interface for scripting interpreter. Each language supported must implement this interface. The implementation fo this interface will typically delegate the work to the underlying third-party interpreter. The implementing class must create an instance of itself and register it with InterpreterDriverManager when it is loaded.- Author:
- Ramnivas Laddad
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classInterpreterDriver.InterpreterExceptionNested class for wrapping the exception throw by underlying interpreter while executing scripts
-
Method Summary
Modifier and Type Method Description voidexecuteScript(SessionPanel session, java.lang.String script)Execute a script string.voidexecuteScriptFile(java.lang.String scriptFile)Execute a script file.voidexecuteScriptFile(SessionPanel session, java.lang.String scriptFile)Execute a script file.java.lang.String[]getSupportedExtensions()Get the extension for supported extensions by this driverjava.lang.String[]getSupportedLanguages()Get the langauges for supported extensions by this driver
-
-
-
Method Detail
-
executeScript
void executeScript(SessionPanel session, java.lang.String script) throws InterpreterDriver.InterpreterException
Execute a script string.- Parameters:
session- a session objectscript- script a string to be interpreted- Throws:
InterpreterDriver.InterpreterException- which wraps the exception throw by underlying interpreter
-
executeScriptFile
void executeScriptFile(SessionPanel session, java.lang.String scriptFile) throws InterpreterDriver.InterpreterException
Execute a script file.- Parameters:
session- a session objectscriptFile- script a name of file to be interpreted- Throws:
InterpreterDriver.InterpreterException- which wraps the exception throw by underlying interpreter
-
executeScriptFile
void executeScriptFile(java.lang.String scriptFile) throws InterpreterDriver.InterpreterExceptionExecute a script file.- Parameters:
scriptFile- a name of file to be interpreted- Throws:
InterpreterDriver.InterpreterException- which wraps the exception throw by underlying interpreter
-
getSupportedExtensions
java.lang.String[] getSupportedExtensions()
Get the extension for supported extensions by this driver- Returns:
- Array of string containing extension supported
-
getSupportedLanguages
java.lang.String[] getSupportedLanguages()
Get the langauges for supported extensions by this driver- Returns:
- Array of string containing languages supported
-
-