Class StageScriptExecutor
- java.lang.Object
-
- org.hortonmachine.gui.spatialtoolbox.core.StageScriptExecutor
-
public class StageScriptExecutor extends Object
Executor of OMS scripts.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringORG_HORTONMACHINE_MODULES
-
Constructor Summary
Constructors Constructor Description StageScriptExecutor(File jgtLibsFolder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProcessListener(org.hortonmachine.gears.utils.processes.IProcessListener listener)Processexec(String sessionId, String script, String loggerLevelGui, String ramLevel, String encoding)Execute an OMS script.booleanisRunning()voidkillProcess(Process process)voidremoveProcessListener(org.hortonmachine.gears.utils.processes.IProcessListener listener)
-
-
-
Field Detail
-
ORG_HORTONMACHINE_MODULES
public static final String ORG_HORTONMACHINE_MODULES
- See Also:
- Constant Field Values
-
-
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 theSpatialToolboxConstants.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)
-
-