com.codemesh.terp.eval.executors
Class BatchExecutor
java.lang.Object
com.codemesh.terp.api.Executor.AbstractExecutor<ProcessExecutor.Result>
com.codemesh.terp.eval.executors.ProcessExecutor
com.codemesh.terp.eval.executors.ShellExecutor
com.codemesh.terp.eval.executors.BatchExecutor
- All Implemented Interfaces:
- Executor<ProcessExecutor.Result>
- Direct Known Subclasses:
- JavaExecutor, JavaToolExecutor
public class BatchExecutor
- extends ShellExecutor
A shell executor that can bundle up several requests in a batch/script file
and run them in one shell.
| Methods inherited from class com.codemesh.terp.eval.executors.ProcessExecutor |
execute, fromFile, fromMap, fromMap, fromString, getEnvironment, getExecutable, getWorkingDir, matches, setEnvironment, setExecutable, setWorkingDir |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BatchExecutor
public BatchExecutor()
batchFromString
public static BatchExecutor batchFromString(java.lang.String executable)
batchFromFile
public static BatchExecutor batchFromFile(java.io.File executable)
batchFromMap
public static BatchExecutor batchFromMap(java.util.Map<java.lang.String,java.lang.Object> map)
batchFromMap
public static BatchExecutor batchFromMap(BatchExecutor result,
java.util.Map<java.lang.String,java.lang.Object> map)
writeCommandsFile
protected boolean writeCommandsFile(java.io.File batchFile,
java.util.List<java.lang.Object> args)
execute
public ProcessExecutor.Result execute(java.util.List<java.lang.Object> args,
TerpEvaluator eval,
TerpContext ctx)
- Description copied from interface:
Executor
- Performs the executor's action on the given arguments in the given context.
Typically, your custom executor will implement this method to provide its
core functionality.
- Specified by:
execute in interface Executor<ProcessExecutor.Result>- Overrides:
execute in class ProcessExecutor
- Parameters:
args - the arguments.eval - the evaluator to use. Can frequently be null.ctx - the context in which the execution occurs. Can frequently be null.
- Returns:
- the execution result.
Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.