|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.internal.ssh.ShellAbstractTool
brooklyn.util.internal.ssh.process.ProcessTool
public class ProcessTool extends ShellAbstractTool
Implementation of ShellTool which runs locally.
Field Summary | |
---|---|
static ConfigKey |
PROP_LOGIN_SHELL
|
Fields inherited from class ShellAbstractTool | |
---|---|
localTempDir |
Constructor Summary | |
ProcessTool()
|
|
ProcessTool(java.util.Map flags)
|
Method Summary | |
---|---|
int
|
execCommands(java.util.Map props, java.util.List commands, java.util.Map env)
|
static int
|
execProcesses(java.util.List cmds, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.String separator, java.lang.Object contextForLogging)
as execProcesses(List, Map, OutputStream, OutputStream, String, boolean, Object) but not using a login shell |
static int
|
execProcesses(java.util.List cmds, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.String separator, boolean asLoginShell, java.lang.Object contextForLogging)
executes a set of commands by sending them as a single process to `bash -c` (single command argument of all the commands, joined with separator) |
int
|
execScript(java.util.Map props, java.util.List commands, java.util.Map env)
|
static int
|
execSingleProcess(java.util.List cmdWords, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.Object contextForLogging)
executes a single process made up of the given command words (*not* bash escaped); should be portable across OS's |
Methods inherited from class ShellAbstractTool | |
---|---|
asInt, buildRunScriptCommand, closeWhispering, closeWhispering, execCommands, execScript, getMandatoryVal, getMandatoryVal, getOptionalVal, getOptionalVal, getOptionalVal, hasVal, toCommandSequence, toScript, warnOnDeprecated, writeTempFile, writeTempFile, writeTempFile |
Field Detail |
---|
public static final ConfigKey PROP_LOGIN_SHELL
Constructor Detail |
---|
public ProcessTool()
public ProcessTool(java.util.Map flags)
Method Detail |
---|
if (props.containsKey("blocks") && props.get("blocks") == Boolean.FALSE) { public int execCommands(java.util.Map props, java.util.List commands, java.util.Map env)
public static int execProcesses(java.util.List cmds, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.String separator, java.lang.Object contextForLogging)
public static int execProcesses(java.util.List cmds, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.String separator, boolean asLoginShell, java.lang.Object contextForLogging)
consequence of this is that you should not normally need to escape things oddly in your commands, type them just as you would into a bash shell (if you find exceptions please note them here!)
try { public int execScript(java.util.Map props, java.util.List commands, java.util.Map env)
public static int execSingleProcess(java.util.List cmdWords, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.Object contextForLogging)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.