Package com.sshtools.server.vsession
Class CommandFactory<T extends Command>
java.lang.Object
com.sshtools.server.vsession.CommandFactory<T>
- Direct Known Subclasses:
AdminCommandFactory
,CallbackCommandFactory
,FileSystemCommandFactory
,JVMCommandFactory
,OSCommandFactory
,ShellCommandFactory
,SshClientsCommandFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddConfigurator
(CommandConfigurator<T> configurator) protected void
configureCommand
(T command, com.sshtools.common.ssh.SshConnection con) createCommand
(String command, com.sshtools.common.ssh.SshConnection con) installCommand
(Class<? extends T> cls) installCommand
(String cmd, Class<? extends T> cls) protected T
newInstance
(String command, com.sshtools.common.ssh.SshConnection con) removeConfigurator
(CommandConfigurator<T> configurator) boolean
supportsCommand
(String command) uninstallCommand
(String cmd)
-
Field Details
-
commands
-
configurators
-
-
Constructor Details
-
CommandFactory
public CommandFactory()
-
-
Method Details
-
addConfigurator
-
removeConfigurator
-
installCommand
-
installCommand
-
uninstallCommand
-
getSupportedCommands
-
supportsCommand
-
createCommand
public T createCommand(String command, com.sshtools.common.ssh.SshConnection con) throws UnsupportedCommandException, IllegalAccessException, InstantiationException, IOException, com.sshtools.common.permissions.PermissionDeniedException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException - Throws:
UnsupportedCommandException
IllegalAccessException
InstantiationException
IOException
com.sshtools.common.permissions.PermissionDeniedException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException
SecurityException
-
newInstance
protected T newInstance(String command, com.sshtools.common.ssh.SshConnection con) throws UnsupportedCommandException, IllegalAccessException, InstantiationException, IOException, com.sshtools.common.permissions.PermissionDeniedException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException - Throws:
UnsupportedCommandException
IllegalAccessException
InstantiationException
IOException
com.sshtools.common.permissions.PermissionDeniedException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException
SecurityException
-
configureCommand
protected void configureCommand(T command, com.sshtools.common.ssh.SshConnection con) throws IOException, com.sshtools.common.permissions.PermissionDeniedException - Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-