Class InterpreterDriverManager


  • public class InterpreterDriverManager
    extends java.lang.Object
    Class for managing interpreter drivers. This manager is responsible for keeping track of loaded driver. Interpreter drivers are required to register instance of themselves with this manager when they are loaded.
    • Method Summary

      Modifier and Type Method Description
      static void executeScript​(SessionPanel session, java.lang.String script, java.lang.String language)
      Execute a script string Execute the string supplied according to the langauge specified
      static void executeScriptFile​(java.lang.String scriptFile)
      Exceute a script file.
      static void executeScriptFile​(SessionPanel session, java.lang.String scriptFile)
      Exceute a script file.
      static boolean isScriptSupported​(java.lang.String scriptFile)
      Check if there is a driver that supports the language.
      static void registerDriver​(InterpreterDriver driver)
      Register a driver.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • registerDriver

        public static void registerDriver​(InterpreterDriver driver)
        Register a driver. Interpreter drivers call this method when they are loaded.
        Parameters:
        driver - the driver to be registered
      • executeScript

        public static void executeScript​(SessionPanel session,
                                         java.lang.String script,
                                         java.lang.String language)
                                  throws InterpreterDriver.InterpreterException
        Execute a script string Execute the string supplied according to the langauge specified
        Parameters:
        session - session panel object
        script - script to be executed
        language - language for interpreting the script string
        Throws:
        InterpreterDriver.InterpreterException - maybe an exception
      • isScriptSupported

        public static boolean isScriptSupported​(java.lang.String scriptFile)
        Check if there is a driver that supports the language.
        Parameters:
        scriptFile - file name containing script
        Returns:
        flag