Class StageScriptExecutor


  • public class StageScriptExecutor
    extends Object
    Executor of OMS scripts.
    Author:
    Andrea Antonello (www.hydrologis.com)
    • Constructor Detail

    • Method Detail

      • exec

        public Process exec​(String sessionId,
                            String script,
                            String loggerLevelGui,
                            String ramLevel,
                            String encoding)
                     throws Exception
        Execute an OMS script.
        Parameters:
        script - the script file or the script string.
        internalStream -
        errorStream -
        loggerLevelGui - the log level as presented in the GUI, can be OFF|ON. This is not the OMS logger level, which in stead has to be picked from the SpatialToolboxConstants.LOGLEVELS_MAP.
        ramLevel - the heap size to use in megabytes.
        encoding -
        Returns:
        the process.
        Throws:
        Exception
      • isRunning

        public boolean isRunning()
      • addProcessListener

        public void addProcessListener​(org.hortonmachine.gears.utils.processes.IProcessListener listener)
      • removeProcessListener

        public void removeProcessListener​(org.hortonmachine.gears.utils.processes.IProcessListener listener)
      • killProcess

        public void killProcess​(Process process)