Class SimpleShellRequest

java.lang.Object
org.dellroad.jct.core.AbstractConsoleRequest<ShellRequest>
org.dellroad.jct.core.simple.SimpleShellRequest
All Implemented Interfaces:
ConsoleRequest<ShellRequest>, ShellRequest

public class SimpleShellRequest extends AbstractConsoleRequest<ShellRequest> implements ShellRequest
Straightforward implementation of the ShellRequest interface.
  • Constructor Details

    • SimpleShellRequest

      public SimpleShellRequest(org.jline.terminal.Terminal terminal, List<String> args, Map<String,String> env)
      Constructor.
      Parameters:
      terminal - associated interactive terminal
      args - shell arguments
      env - environment variables, or null for an empty map
      Throws:
      IllegalArgumentException - if terminal or args is null
  • Method Details

    • getTerminal

      public org.jline.terminal.Terminal getTerminal()
      Description copied from interface: ShellRequest
      Get the associated Terminal.
      Specified by:
      getTerminal in interface ShellRequest
      Returns:
      the shell's associated Terminal
    • getShellArguments

      public List<String> getShellArguments()
      Description copied from interface: ShellRequest
      Get the command line arguments for the shell.

      How these are interpreted is up to the specific shell being invoked. Some may simply ignore them.

      Specified by:
      getShellArguments in interface ShellRequest
      Returns:
      zero or more shell command line arguments, never null