public interface ProcessTaskFactory<T> extends TaskFactory<ProcessTaskWrapper<T>>
Modifier and Type | Method and Description |
---|---|
ProcessTaskFactory<T> |
add(java.lang.Iterable<java.lang.String> commandsToAdd) |
ProcessTaskFactory<T> |
add(java.lang.String... commandsToAdd) |
ProcessTaskFactory<T> |
addCompletionListener(com.google.common.base.Function<ProcessTaskWrapper<?>,java.lang.Void> function)
adds a listener which will be notified of (otherwise) successful completion,
typically used to invalidate the result (ie throw exception, to promote a string in the output to an exception);
invoked even if return code is zero, so a better error can be thrown
|
ProcessTaskFactory<T> |
allowingNonZeroExitCode() |
<V> ProcessTaskFactory<T> |
configure(ConfigKey<V> key,
V value)
allows setting config-key based properties for specific underlying tools
|
ProcessTaskFactory<T> |
configure(java.util.Map<?,?> flags)
allows setting config-key/flag based properties for specific underlying tools;
but note that if any are prefixed with
SshTool.BROOKLYN_CONFIG_KEY_PREFIX
these should normally be filtered out |
ProcessTaskFactory<T> |
environmentVariable(java.lang.String key,
java.lang.String val) |
ProcessTaskFactory<T> |
environmentVariables(java.util.Map<java.lang.String,java.lang.String> vars) |
ProcessTaskFactory<T> |
machine(SshMachineLocation machine) |
ProcessTaskFactory<T> |
requiringExitCodeZero() |
ProcessTaskFactory<T> |
requiringExitCodeZero(java.lang.String extraErrorMessage) |
ProcessTaskFactory<java.lang.String> |
requiringZeroAndReturningStdout() |
<RET2> ProcessTaskFactory<RET2> |
returning(com.google.common.base.Function<ProcessTaskWrapper<?>,RET2> resultTransformation) |
<RET2> ProcessTaskFactory<RET2> |
returning(ProcessTaskStub.ScriptReturnType type) |
ProcessTaskFactory<java.lang.Boolean> |
returningIsExitCodeZero() |
ProcessTaskFactory<T> |
runAsCommand() |
ProcessTaskFactory<T> |
runAsRoot() |
ProcessTaskFactory<T> |
runAsScript() |
ProcessTaskFactory<T> |
summary(java.lang.String summary) |
newTask
ProcessTaskFactory<T> machine(SshMachineLocation machine)
ProcessTaskFactory<T> add(java.lang.String... commandsToAdd)
ProcessTaskFactory<T> add(java.lang.Iterable<java.lang.String> commandsToAdd)
ProcessTaskFactory<T> requiringExitCodeZero()
ProcessTaskFactory<T> requiringExitCodeZero(java.lang.String extraErrorMessage)
ProcessTaskFactory<T> allowingNonZeroExitCode()
ProcessTaskFactory<java.lang.String> requiringZeroAndReturningStdout()
ProcessTaskFactory<java.lang.Boolean> returningIsExitCodeZero()
<RET2> ProcessTaskFactory<RET2> returning(ProcessTaskStub.ScriptReturnType type)
<RET2> ProcessTaskFactory<RET2> returning(com.google.common.base.Function<ProcessTaskWrapper<?>,RET2> resultTransformation)
ProcessTaskFactory<T> runAsCommand()
ProcessTaskFactory<T> runAsScript()
ProcessTaskFactory<T> runAsRoot()
ProcessTaskFactory<T> environmentVariable(java.lang.String key, java.lang.String val)
ProcessTaskFactory<T> environmentVariables(java.util.Map<java.lang.String,java.lang.String> vars)
ProcessTaskFactory<T> summary(java.lang.String summary)
@Beta <V> ProcessTaskFactory<T> configure(ConfigKey<V> key, V value)
@Beta ProcessTaskFactory<T> configure(java.util.Map<?,?> flags)
SshTool.BROOKLYN_CONFIG_KEY_PREFIX
these should normally be filtered outProcessTaskFactory<T> addCompletionListener(com.google.common.base.Function<ProcessTaskWrapper<?>,java.lang.Void> function)