Package org.apache.sshd.server.command
Class AbstractDelegatingCommandFactory
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.command.AbstractDelegatingCommandFactory
- All Implemented Interfaces:
CommandFactory
- Direct Known Subclasses:
ScpCommandFactory
public abstract class AbstractDelegatingCommandFactory
extends AbstractLoggingBean
implements CommandFactory
TODO Add javadoc
-
Field Summary
FieldsFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCommand
(ChannelSession channel, String command) Create a command with the given name.protected Command
createUnsupportedCommand
(String command) protected abstract Command
executeSupportedCommand
(String command) abstract boolean
isSupportedCommand
(String command) void
setDelegateCommandFactory
(CommandFactory factory) toString()
-
Field Details
-
name
-
delegate
-
-
Constructor Details
-
AbstractDelegatingCommandFactory
-
-
Method Details
-
toString
-
getDelegateCommandFactory
-
setDelegateCommandFactory
-
createCommand
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
-
isSupportedCommand
- Parameters:
command
- The command about to be executed- Returns:
true
if this command is supported by the command factory,false
if it will be passed on to thedelegate
factory
-
executeSupportedCommand
-
createUnsupportedCommand
-