Package org.dellroad.jct.core.simple
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the command line arguments for the shell.org.jline.terminal.Terminal
Get the associatedTerminal
.Methods inherited from class org.dellroad.jct.core.AbstractConsoleRequest
getEnvironment
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.dellroad.jct.core.ConsoleRequest
getEnvironment
-
Constructor Details
-
SimpleShellRequest
public SimpleShellRequest(org.jline.terminal.Terminal terminal, List<String> args, Map<String, String> env) Constructor.- Parameters:
terminal
- associated interactive terminalargs
- shell argumentsenv
- environment variables, or null for an empty map- Throws:
IllegalArgumentException
- ifterminal
orargs
is null
-
-
Method Details
-
getTerminal
public org.jline.terminal.Terminal getTerminal()Description copied from interface:ShellRequest
Get the associatedTerminal
.- Specified by:
getTerminal
in interfaceShellRequest
- Returns:
- the shell's associated
Terminal
-
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 interfaceShellRequest
- Returns:
- zero or more shell command line arguments, never null
-