edu.washington.cs.pl_if.ssh
Class CommandSpec

java.lang.Object
  extended by edu.washington.cs.pl_if.ssh.CommandSpec

public class CommandSpec
extends Object


Field Summary
static int RETURN_KILLED
           
static int RETURN_TIMEDOUT
           
 
Constructor Summary
CommandSpec(String command, double timeout, int commandId, boolean stopOnError)
           
 
Method Summary
 String getCommand()
           
 int getCommandId()
           
 Map<String,Object> getCommandStats()
           
 double getExecutionTime()
           
 int getExitCode()
           
 String getExitCodeString()
           
 double getLastDataTime()
           
 String getLastLine()
           
 int getLineNum()
           
 String getProcLine(int lineNum)
           
 List<Map> getProcOutput(int startPos)
           
 double getTimeout()
           
 boolean isCompleted()
           
 boolean isKilled()
           
 boolean isStarted()
           
 boolean isStopOnError()
           
 boolean isTimedOut()
           
 void kill()
           
 void receivedData(String line)
           
 void receivedErr(String line)
           
 void recievedControllData(String line)
           
 void recievedControllErr(String line)
           
 void setExitCode(int code)
           
 void setExitCode(int code, String exitCodeString)
           
 void started()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RETURN_KILLED

public static final int RETURN_KILLED
See Also:
Constant Field Values

RETURN_TIMEDOUT

public static final int RETURN_TIMEDOUT
See Also:
Constant Field Values
Constructor Detail

CommandSpec

public CommandSpec(String command,
                   double timeout,
                   int commandId,
                   boolean stopOnError)
Method Detail

started

public void started()

isKilled

public boolean isKilled()

kill

public void kill()

isStarted

public boolean isStarted()

recievedControllData

public void recievedControllData(String line)

recievedControllErr

public void recievedControllErr(String line)

receivedData

public void receivedData(String line)

receivedErr

public void receivedErr(String line)

getCommand

public String getCommand()

getTimeout

public double getTimeout()

getCommandStats

public Map<String,Object> getCommandStats()

isTimedOut

public boolean isTimedOut()

isCompleted

public boolean isCompleted()

getExecutionTime

public double getExecutionTime()

getExitCode

public int getExitCode()

getExitCodeString

public String getExitCodeString()

setExitCode

public void setExitCode(int code,
                        String exitCodeString)

setExitCode

public void setExitCode(int code)

getProcLine

public String getProcLine(int lineNum)

getLastLine

public String getLastLine()

getProcOutput

public List<Map> getProcOutput(int startPos)

getLineNum

public int getLineNum()

getCommandId

public int getCommandId()

toString

public String toString()
Overrides:
toString in class Object

isStopOnError

public boolean isStopOnError()

getLastDataTime

public double getLastDataTime()