|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
interface CommandExecutionIOStorage
This class encapsulates the storage of IO for commands, this way it is easy to "disable" the storage.
Method Summary | |
---|---|
CommandExecution
|
createStorageForCommandExecution(java.lang.Object args)
@param gluCommandFactory create storage for command execution |
CommandExecution
|
findCommandExecution(java.lang.String commandId)
@return the command of a previously run/stored command |
java.lang.Object
|
findCommandExecutionAndStreams(java.lang.String commandId, java.lang.Object args)
This method allows you to start streaming the results (stdout, stderr,...) while the command is still running. |
java.lang.Object
|
withOrWithoutCommandExecutionAndStreams(java.lang.String commandId, java.lang.Object args, groovy.lang.Closure closure)
Similar to findCommandExecutionAndStreams but calls the closure with the map
or with |
Method Detail |
---|
CommandExecution createStorageForCommandExecution(java.lang.Object args)
gluCommandFactory
- create storage for command execution
CommandExecution findCommandExecution(java.lang.String commandId)
java.lang.Object findCommandExecutionAndStreams(java.lang.String commandId, java.lang.Object args)
args.exitValueStream
- if you want the exit value to be part of the stream
(boolean
, optional, false
by default)args.exitValueStreamTimeout
- how long to wait to get the exit value if the command is
not completed yet (optional, in the event that
exitValueStream
is set to
true
and exitValueStreamTimeout
is not provided, it will not block and return no exit value
stream)args.stdinStream
- if you want stdin to be part of the stream
(boolean
, optional, false
by default)args.stdinOffset
- where to start in the stdin stream (optional, int
,
0
by default)args.stdinLen
- how many bytes to read maximum (optional, int
,
-1
by default which means read all)args.stdoutStream
- if you want stdout to be part of the stream
(boolean
, optional, false
by default)args.stdoutOffset
- where to start in the stdout stream (optional, int
,
0
by default)args.stdoutLen
- how many bytes to read maximum (optional, int
,
-1
by default which means read all)args.stderrStream
- if you want stdout to be part of the stream
(boolean
, optional, false
by default)args.stderrOffset
- where to start in the stdout stream (optional, int
,
0
by default)args.stderrLen
- how many bytes to read maximum (optional, int
,
-1
by default which means read all)commandExecution
and stream
(if any)
(null
if no such command)
java.lang.Object withOrWithoutCommandExecutionAndStreams(java.lang.String commandId, java.lang.Object args, groovy.lang.Closure closure)
null
Groovy Documentation