Class AbstractSshClientCommand
java.lang.Object
com.sshtools.server.vsession.AbstractCommand
com.sshtools.server.vsession.ShellCommand
com.sshtools.vsession.commands.ssh.AbstractSshClientCommand
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
SshClientCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected VirtualConsole
protected org.apache.commons.cli.Options
Fields inherited from class com.sshtools.server.vsession.ShellCommand
SUBSYSTEM_CALLBACK, SUBSYSTEM_FILESYSTEM, SUBSYSTEM_HELP, SUBSYSTEM_JVM, SUBSYSTEM_POLICY, SUBSYSTEM_SHELL, SUBSYSTEM_SSHD, SUBSYSTEM_SYSTEM, SUBSYSTEM_TEXT_EDITING
Fields inherited from class com.sshtools.server.vsession.AbstractCommand
exitCode
Fields inherited from interface com.sshtools.server.vsession.Command
STILL_ACTIVE
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSshClientCommand
(String name, String subsystem, String signature, String description) -
Method Summary
Modifier and TypeMethodDescriptionvoid
complete
(org.jline.reader.LineReader reader, org.jline.reader.ParsedLine line, List<org.jline.reader.Candidate> candidates) protected String[]
filterArgs
(String[] args) protected abstract SshClientArguments
generateCommandArguments
(org.apache.commons.cli.CommandLine cli, String[] args) org.apache.commons.cli.Options
getUsage()
void
run
(String[] args, VirtualConsole console) protected abstract void
runCommand
(SshClient sshClient, SshClientArguments arguments, VirtualConsole console) Methods inherited from class com.sshtools.server.vsession.AbstractCommand
getCommandName, getDescription, getExitCode, getName, getSubsystem, isBuiltIn, isHidden, setBuiltIn, setDescription, setName, setSignature, setSubsystem
-
Field Details
-
options
protected org.apache.commons.cli.Options options -
console
-
-
Constructor Details
-
AbstractSshClientCommand
-
-
Method Details
-
getOptions
public org.apache.commons.cli.Options getOptions() -
getUsage
- Specified by:
getUsage
in interfaceCommand
- Overrides:
getUsage
in classAbstractCommand
-
run
public void run(String[] args, VirtualConsole console) throws IOException, com.sshtools.common.permissions.PermissionDeniedException, UsageException - Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
UsageException
-
complete
public void complete(org.jline.reader.LineReader reader, org.jline.reader.ParsedLine line, List<org.jline.reader.Candidate> candidates) - Specified by:
complete
in interfaceCommand
- Overrides:
complete
in classAbstractCommand
-
runCommand
protected abstract void runCommand(SshClient sshClient, SshClientArguments arguments, VirtualConsole console) -
generateCommandArguments
protected abstract SshClientArguments generateCommandArguments(org.apache.commons.cli.CommandLine cli, String[] args) throws IOException, com.sshtools.common.permissions.PermissionDeniedException - Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-
filterArgs
-