Modifier and Type | Field and Description |
---|---|
protected CommandFactory<ShellCommand> |
commandFactory |
static org.slf4j.Logger |
log |
static String |
LOGIN_CONTEXT |
protected Map<Integer,com.sshtools.server.vshell.Msh.Job> |
runningJobs |
SUBSYSTEM_CALLBACK, SUBSYSTEM_FILESYSTEM, SUBSYSTEM_HELP, SUBSYSTEM_JVM, SUBSYSTEM_POLICY, SUBSYSTEM_SHELL, SUBSYSTEM_SSHD, SUBSYSTEM_SYSTEM, SUBSYSTEM_TEXT_EDITING
exitCode, process
STILL_ACTIVE
Constructor and Description |
---|
Msh(CommandFactory<ShellCommand> commandFactory) |
Msh(String name,
String subsystem,
CommandFactory<ShellCommand> commandFactory) |
Msh(String name,
String subsystem,
String signature,
CommandFactory<ShellCommand> commandFactory) |
Msh(String name,
String subsystem,
String signature,
CommandFactory<ShellCommand> commandFactory,
org.apache.commons.cli.Option... options) |
Modifier and Type | Method and Description |
---|---|
protected int |
doSpawn(Console term,
VirtualProcess process,
String[] args,
boolean background) |
void |
exit() |
String |
expandEnvironmentVariables(String value,
Map<String,String> additionalReplacements) |
CommandFactory<ShellCommand> |
getCommandFactory() |
Throwable |
getLastError() |
protected void |
parseArgs(VirtualProcess process,
List<String> lineArgs) |
protected void |
parseLine(VirtualProcess process,
String line) |
void |
run(org.apache.commons.cli.CommandLine cli,
VirtualProcess process) |
protected void |
runShell(VirtualProcess process) |
protected void |
setCommandFactory(CommandFactory<ShellCommand> commandFactory) |
protected void |
source(VirtualProcess process,
AbstractFile file) |
protected void |
source(VirtualProcess process,
InputStream in) |
protected int |
spawn(Console term,
VirtualProcess process,
String[] args,
boolean background) |
complete, getCollection, getCommandName, getDescription, getExitCode, getName, getOptions, getProcess, getSignature, getSubsystem, hasFixedOptions, init, isBuiltIn, isHidden, setBuiltIn, setDescription, setName, setSignature, setSubsystem
protected CommandFactory<ShellCommand> commandFactory
public static final org.slf4j.Logger log
public static final String LOGIN_CONTEXT
public Msh(CommandFactory<ShellCommand> commandFactory)
public Msh(String name, String subsystem, String signature, CommandFactory<ShellCommand> commandFactory, org.apache.commons.cli.Option... options)
public Msh(String name, String subsystem, String signature, CommandFactory<ShellCommand> commandFactory)
public Msh(String name, String subsystem, CommandFactory<ShellCommand> commandFactory)
protected void setCommandFactory(CommandFactory<ShellCommand> commandFactory)
public String expandEnvironmentVariables(String value, Map<String,String> additionalReplacements)
protected void runShell(VirtualProcess process) throws IOException
IOException
public void run(org.apache.commons.cli.CommandLine cli, VirtualProcess process) throws IOException, PermissionDeniedException
IOException
PermissionDeniedException
protected void source(VirtualProcess process, AbstractFile file) throws IOException
IOException
protected void source(VirtualProcess process, InputStream in) throws IOException
IOException
protected void parseArgs(VirtualProcess process, List<String> lineArgs) throws IOException
IOException
protected void parseLine(VirtualProcess process, String line) throws IOException
IOException
protected int spawn(Console term, VirtualProcess process, String[] args, boolean background) throws IOException
IOException
protected int doSpawn(Console term, VirtualProcess process, String[] args, boolean background) throws UnsupportedCommandException, IllegalAccessException, InstantiationException, org.apache.commons.cli.ParseException, IOException, PermissionDeniedException, UsageException
UnsupportedCommandException
IllegalAccessException
InstantiationException
org.apache.commons.cli.ParseException
IOException
PermissionDeniedException
UsageException
public Throwable getLastError()
public void exit()
public CommandFactory<ShellCommand> getCommandFactory()
Copyright © 2024. All rights reserved.