Package org.apache.sshd.server.shell
Class ProcessShellCommandFactory
- java.lang.Object
-
- org.apache.sshd.server.shell.ProcessShellCommandFactory
-
- All Implemented Interfaces:
CommandFactory
public class ProcessShellCommandFactory extends java.lang.Object implements CommandFactory
Executes commands by invoking the underlying shell
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFACTORY_NAMEstatic ProcessShellCommandFactoryINSTANCE
-
Constructor Summary
Constructors Constructor Description ProcessShellCommandFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandcreateCommand(ChannelSession channel, java.lang.String command)Create a command with the given name.java.lang.StringtoString()
-
-
-
Field Detail
-
FACTORY_NAME
public static final java.lang.String FACTORY_NAME
- See Also:
- Constant Field Values
-
INSTANCE
public static final ProcessShellCommandFactory INSTANCE
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
createCommand
public Command createCommand(ChannelSession channel, java.lang.String command) throws java.io.IOException
Description copied from interface:CommandFactoryCreate a command with the given name. If the command is not known, a dummy command should be returned to allow the display output to be sent back to the client.- Specified by:
createCommandin interfaceCommandFactory- Parameters:
channel- TheChannelSessionthrough which the command has been receivedcommand- The command that will be run- Returns:
- a non
nullCommandinstance - Throws:
java.io.IOException- if failed to create the instance
-
-