public class BasicCommandLauncher extends Object implements CommandLauncher
CommandLauncher
.Modifier and Type | Class and Description |
---|---|
static class |
BasicCommandLauncher.Output
Represents a kind of output target.
|
static class |
BasicCommandLauncher.OutputChannel
Represents a kind of output.
|
static interface |
BasicCommandLauncher.OutputConsumer
Consumes command output by lines.
|
Constructor and Description |
---|
BasicCommandLauncher(BasicCommandLauncher.OutputConsumer output,
Path workingDir,
Map<String,String> environment)
Creates a new instance.
|
BasicCommandLauncher(Path workingDir,
Map<String,String> environment)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
launch(Path command,
List<String> arguments)
Launches the command.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
launch
public BasicCommandLauncher(Path workingDir, Map<String,String> environment)
workingDir
- the command working directoryenvironment
- environment variablespublic BasicCommandLauncher(BasicCommandLauncher.OutputConsumer output, Path workingDir, Map<String,String> environment)
output
- the output consumerworkingDir
- the command working directoryenvironment
- environment variablespublic int launch(Path command, List<String> arguments) throws IOException, InterruptedException
CommandLauncher
launch
in interface CommandLauncher
command
- the command locationarguments
- the command argumentsIOException
- if command execution was failedInterruptedException
- if interrupted while executing the commandCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.