Package org.apache.sshd.server.command
Interface CommandLifecycle
-
- All Known Subinterfaces:
AsyncCommand
,Command
,InvertedShell
- All Known Implementing Classes:
AbstractCommandSupport
,AbstractFileSystemCommand
,InvertedShellWrapper
,ProcessShell
,UnknownCommand
public interface CommandLifecycle
- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy(ChannelSession channel)
This method is called by the SSH server to destroy the command because the client has disconnected somehow.void
start(ChannelSession channel, Environment env)
Starts the command execution.
-
-
-
Method Detail
-
start
void start(ChannelSession channel, Environment env) throws IOException
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
- TheChannelSession
through which the command has been receivedenv
- TheEnvironment
- Throws:
IOException
- If failed to start
-
destroy
void destroy(ChannelSession channel) throws Exception
This method is called by the SSH server to destroy the command because the client has disconnected somehow.- Parameters:
channel
- TheChannelSession
through which the command has been received- Throws:
Exception
- if failed to destroy
-
-