Package org.apache.sshd.server.command
Interface CommandLifecycle
- All Known Subinterfaces:
AsyncCommand,Command,InvertedShell
- All Known Implementing Classes:
AbstractCommandSupport,AbstractFileSystemCommand,InvertedShellWrapper,ProcessShell,ScpCommand,ScpShell,SftpSubsystem,UnknownCommand
public interface CommandLifecycle
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy(ChannelSession channel) This method is called by the SSH server to destroy the command because the client has disconnected somehow.voidstart(ChannelSession channel, Environment env) Starts the command execution.
-
Method Details
-
start
Starts the command execution. All streams must have been set before calling this method. The command should implementRunnable, and this method should spawn a new thread like:Thread(this).start();- Parameters:
channel- TheChannelSessionthrough which the command has been receivedenv- TheEnvironment- Throws:
IOException- If failed to start
-
destroy
This method is called by the SSH server to destroy the command because the client has disconnected somehow.- Parameters:
channel- TheChannelSessionthrough which the command has been received- Throws:
Exception- if failed to destroy
-