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.TerminalGet the associatedTerminal.Methods inherited from class org.dellroad.jct.core.AbstractConsoleRequest
getEnvironmentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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- ifterminalorargsis null
-
-
Method Details
-
getTerminal
public org.jline.terminal.Terminal getTerminal()Description copied from interface:ShellRequestGet the associatedTerminal.- Specified by:
getTerminalin interfaceShellRequest- Returns:
- the shell's associated
Terminal
-
getShellArguments
Description copied from interface:ShellRequestGet 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:
getShellArgumentsin interfaceShellRequest- Returns:
- zero or more shell command line arguments, never null
-