Package com.botbox.bbsh
Class CommandContext
java.lang.Object
com.botbox.bbsh.CommandContext
public class CommandContext
extends java.lang.Object
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CommandContext(CLIContext ch, java.lang.String commandLine, java.lang.String[] args, int pid, Command command) -
Method Summary
Modifier and Type Method Description intexecuteCommand(java.lang.String command)voidexit(int exitCode)exit needs to be called as soon as the command is completed (or stopped).CLIgetCLI()CLIContextgetCLIContext()java.lang.StringgetCommandName()EnvgetEnv()intgetPID()booleanhasExited()java.lang.StringtoString()
-
Field Details
-
Constructor Details
-
CommandContext
public CommandContext(CLIContext ch, java.lang.String commandLine, java.lang.String[] args, int pid, Command command)
-
-
Method Details
-
getCLI
-
getCLIContext
-
getEnv
-
getPID
public int getPID() -
hasExited
public boolean hasExited() -
exit
public void exit(int exitCode)exit needs to be called as soon as the command is completed (or stopped).- Parameters:
exitCode- - the exit code of the command
-
getCommandName
public java.lang.String getCommandName() -
executeCommand
public int executeCommand(java.lang.String command) -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-