Groovy Documentation

org.linkedin.glu.agent.impl.command
[Groovy] Interface CommandManager


interface CommandManager

Authors:
yan@pongasoft.com


Method Summary
CommandExecution executeShellCommand(java.lang.Object args)

{@see org.linkedin.glu.agent.api.Agent#executeShellCommand} for a description of the arguments

java.lang.Object findCommandExecutionAndStreams(java.lang.Object args)

@param args.exitValue if you want the exit value to be part of the stream (boolean, optional, false by default)

boolean interruptCommand(java.lang.Object args)

{@see org.linkedin.glu.agent.api.Agent#interruptCommand} for a description of the arguments

java.lang.Object waitForCommand(java.lang.Object args)

{@see org.linkedin.glu.agent.api.Agent#waitForCommand} for a description of the arguments

 

Method Detail

executeShellCommand

CommandExecution executeShellCommand(java.lang.Object args)
{
See Also:
org.linkedin.glu.agent.api.Agent#executeShellCommand


findCommandExecutionAndStreams

java.lang.Object findCommandExecutionAndStreams(java.lang.Object args)
Parameters:
args.exitValue - if you want the exit value to be part of the stream (boolean, optional, false by default)
args.timeout - how long to wait to get the exit value if the command is not completed yet (optional, in the event that arg.exitValue is set to true and timeout is not provided, it will not block and return no exitValue)
args.stdin - 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.stdout - 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.stderr - 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)
Returns:
a map with commandExecution and stream or null if not found


interruptCommand

boolean interruptCommand(java.lang.Object args)
{
See Also:
org.linkedin.glu.agent.api.Agent#interruptCommand


waitForCommand

java.lang.Object waitForCommand(java.lang.Object args)
{
See Also:
org.linkedin.glu.agent.api.Agent#waitForCommand


 

Groovy Documentation