Top Description Fields Constructors Methods
org.apache.sshd.server.shell

public Class ProcessShellCommandFactory

extends Object
implements CommandFactory
Class Inheritance
All Implemented Interfaces
org.apache.sshd.server.command.CommandFactory
Imports
java.io.IOException, org.apache.sshd.server.channel.ChannelSession, org.apache.sshd.server.command.Command, .CommandFactory

Executes commands by invoking the underlying shell
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final String
public static final ProcessShellCommandFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Command
createCommand(ChannelSession
The ChannelSession through which the command has been received
channel
,
String
The command that will be run
command
)

Implements org.apache.sshd.server.command.CommandFactory.createCommand.

Create a command with the given name.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

FACTORY_NAMEback to summary
public static final String FACTORY_NAME
INSTANCEback to summary
public static final ProcessShellCommandFactory INSTANCE

Constructor Detail

ProcessShellCommandFactoryback to summary
public ProcessShellCommandFactory()

Method Detail

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

Implements org.apache.sshd.server.command.CommandFactory.createCommand.

Doc from org.apache.sshd.server.command.CommandFactory.createCommand.

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

Annotations
@Override
Exceptions
IOException:
if failed to create the instance
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override