Interface ExecRequest

All Superinterfaces:
ConsoleRequest<ExecRequest>
All Known Implementing Classes:
SimpleExecRequest

public interface ExecRequest extends ConsoleRequest<ExecRequest>
Represents a request to create a new ExecSession to execute a command.

The command is specified in one of two ways: as a single string (via getCommandString()) or as an array of strings (via getCommandList()). In the former case, this instance is responsible for whatever parsing is needed; the "command" could actually be more like a script, e.g., "echo foo; echo bar;".

  • Method Details

    • getInputStream

      InputStream getInputStream()
      Get this request's input stream.
      Returns:
      command input
    • getOutputStream

      PrintStream getOutputStream()
      Get this request's normal output stream.
      Returns:
      command output
    • getErrorStream

      PrintStream getErrorStream()
      Get this request's error output stream.
      Returns:
      command error output
    • getCommandString

      String getCommandString()
      Get this request's command to execute as a single string.

      The command is given as a single string. Typically the string is parsed somehow into a distinguisble command.

      Returns:
      the command to execute, or null if getCommandList() returns a non-null array
    • getCommandList

      List<String> getCommandList()
      Get this request's command to execute as a string array.
      Returns:
      the command to execute, or null if getCommandString() returns a non-null command string