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 Object implements CommandFactory
Executes commands by invoking the underlying shell- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static String
FACTORY_NAME
static ProcessShellCommandFactory
INSTANCE
-
Constructor Summary
Constructors Constructor Description ProcessShellCommandFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Command
createCommand(ChannelSession channel, String command)
Create a command with the given name.String
toString()
-
-
-
Field Detail
-
FACTORY_NAME
public static final String FACTORY_NAME
- See Also:
- Constant Field Values
-
INSTANCE
public static final ProcessShellCommandFactory INSTANCE
-
-
Method Detail
-
createCommand
public Command createCommand(ChannelSession channel, String command) throws IOException
Description copied from interface:CommandFactory
Create 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:
createCommand
in interfaceCommandFactory
- Parameters:
channel
- TheChannelSession
through which the command has been receivedcommand
- The command that will be run- Returns:
- a non
null
Command
instance - Throws:
IOException
- if failed to create the instance
-
-