| 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_EDITINGexitCode, processSTILL_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, setSubsystemprotected 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
IOExceptionpublic void run(org.apache.commons.cli.CommandLine cli,
VirtualProcess process)
throws IOException,
PermissionDeniedException
IOExceptionPermissionDeniedExceptionprotected void source(VirtualProcess process, AbstractFile file) throws IOException
IOExceptionprotected void source(VirtualProcess process, InputStream in) throws IOException
IOExceptionprotected void parseArgs(VirtualProcess process, List<String> lineArgs) throws IOException
IOExceptionprotected void parseLine(VirtualProcess process, String line) throws IOException
IOExceptionprotected int spawn(Console term, VirtualProcess process, String[] args, boolean background) throws IOException
IOExceptionprotected int doSpawn(Console term, VirtualProcess process, String[] args, boolean background) throws UnsupportedCommandException, IllegalAccessException, InstantiationException, org.apache.commons.cli.ParseException, IOException, PermissionDeniedException, UsageException
UnsupportedCommandExceptionIllegalAccessExceptionInstantiationExceptionorg.apache.commons.cli.ParseExceptionIOExceptionPermissionDeniedExceptionUsageExceptionpublic Throwable getLastError()
public void exit()
public CommandFactory<ShellCommand> getCommandFactory()
Copyright © 2025. All rights reserved.