Top Methods
org.apache.sshd.server.command

public Interface CommandLifecycle

Known Direct Subinterfaces
org.apache.sshd.server.shell.InvertedShell, org.apache.sshd.server.command.Command
Imports
java.io.IOException, org.apache.sshd.server.Environment, org.apache.sshd.server.channel.ChannelSession

Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public void
destroy(ChannelSession
The ChannelSession through which the command has been received
channel
)

This method is called by the SSH server to destroy the command because the client has disconnected somehow.

public void
start(ChannelSession
The ChannelSession through which the command has been received
channel
,
Environment env)

Starts the command execution.

Method Detail

destroyback to summary
public 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:ChannelSession

The ChannelSession through which the command has been received

Exceptions
Exception:
if failed to destroy
startback to summary
public 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 implement java.lang.Runnable, and this method should spawn a new thread like:

Thread(this).start();

Parameters
channel:ChannelSession

The ChannelSession through which the command has been received

env:Environment

The Environment

Exceptions
IOException:
If failed to start