Package scriptella.driver.shell
Class ShellScriptExecutor
java.lang.Object
scriptella.driver.shell.ShellScriptExecutor
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Executes a shell script and sends its output to the specified writer.
See scriptella/driver/shell/ShellDriverITest.xml for usage example
- Version:
- 1.0
- Author:
- Fyodor Kupolov
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionShellScriptExecutor(Writer out, ShellConnectionParameters params) Creates an executor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidexecute(Reader reader, ParametersCallback pc, AbstractConnection.StatementCounter counter) Parses a script from read, expands properties and produces the output.voidflush()
-
Constructor Details
-
ShellScriptExecutor
Creates an executor.- Parameters:
out- writer for output.params- connection parameters.
-
-
Method Details
-
execute
public void execute(Reader reader, ParametersCallback pc, AbstractConnection.StatementCounter counter) Parses a script from read, expands properties and produces the output.- Parameters:
reader- script content.pc- parameters for substitution.counter- statements counter.
-
flush
- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-