Top Description Methods
org.apache.sshd.server.command

public Interface CommandFactory

Known Direct Implementers
org.apache.sshd.server.shell.ProcessShellCommandFactory, org.apache.sshd.server.shell.UnknownCommandFactory, org.apache.sshd.server.command.AbstractDelegatingCommandFactory
Annotations
@FunctionalInterface
Imports
java.io.IOException, java.util.ArrayList, .Collections, .List, org.apache.sshd.common.util.GenericUtils, org.apache.sshd.server.channel.ChannelSession

Commands are executed on the server side when an "exec" channel is requested by the SSH client.
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public Command

Returns:

a non null Command instance
createCommand
(ChannelSession
The ChannelSession through which the command has been received
channel
,
String
The command that will be run
command
)

Create a command with the given name.

public static List<String>

Returns:

The parsed command elements while stripping quoted arguments
split
(String
The raw command - ignored if null/empty
command
)

Method Detail

createCommandback to summary
public Command createCommand(ChannelSession channel, String command) throws IOException

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.

Parameters
channel:ChannelSession

The ChannelSession through which the command has been received

command:String

The command that will be run

Returns:Command

a non null Command instance

Exceptions
IOException:
if failed to create the instance
splitback to summary
public static List<String> split(String command)
Parameters
command:String

The raw command - ignored if null/empty

Returns:List<String>

The parsed command elements while stripping quoted arguments