Package com.sshtools.server.vsession
Class ShellCommandFactory
java.lang.Object
com.sshtools.server.vsession.CommandFactory<ShellCommand>
com.sshtools.server.vsession.ShellCommandFactory
-
Field Summary
Fields inherited from class com.sshtools.server.vsession.CommandFactory
commands, configurators
-
Constructor Summary
ConstructorsConstructorDescriptionShellCommandFactory
(CommandFactory<? extends ShellCommand>... commandFactories) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureCommand
(ShellCommand c, com.sshtools.common.ssh.SshConnection con) createShell
(com.sshtools.common.ssh.SshConnection connection) void
installFactory
(CommandFactory<ShellCommand> factory) protected void
protected ShellCommand
newInstance
(String command, com.sshtools.common.ssh.SshConnection con) boolean
supportsCommand
(String command) Methods inherited from class com.sshtools.server.vsession.CommandFactory
addConfigurator, createCommand, installCommand, installCommand, removeConfigurator, uninstallCommand
-
Constructor Details
-
ShellCommandFactory
-
-
Method Details
-
installShellCommands
protected void installShellCommands() -
installFactory
-
getSupportedCommands
- Overrides:
getSupportedCommands
in classCommandFactory<ShellCommand>
-
newInstance
protected ShellCommand newInstance(String command, com.sshtools.common.ssh.SshConnection con) throws UnsupportedCommandException, IllegalAccessException, InstantiationException, IOException, com.sshtools.common.permissions.PermissionDeniedException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException - Overrides:
newInstance
in classCommandFactory<ShellCommand>
- Throws:
UnsupportedCommandException
IllegalAccessException
InstantiationException
IOException
com.sshtools.common.permissions.PermissionDeniedException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException
SecurityException
-
supportsCommand
- Overrides:
supportsCommand
in classCommandFactory<ShellCommand>
-
createShell
public RootShell createShell(com.sshtools.common.ssh.SshConnection connection) throws com.sshtools.common.permissions.PermissionDeniedException, IOException - Throws:
com.sshtools.common.permissions.PermissionDeniedException
IOException
-
configureCommand
protected void configureCommand(ShellCommand c, com.sshtools.common.ssh.SshConnection con) throws IOException, com.sshtools.common.permissions.PermissionDeniedException - Overrides:
configureCommand
in classCommandFactory<ShellCommand>
- Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-