public interface

SshCommand

com.atlassian.bitbucket.ssh.command.SshCommand

Class Overview

Describes an SSH command, which can be run or canceled.

Summary

Public Methods
void cancel()
Cancels a running command, usually in response to the SSH client disconnecting.
int run()
Runs the command, returning its exit code.

Public Methods

public void cancel ()

Cancels a running command, usually in response to the SSH client disconnecting.

public int run ()

Runs the command, returning its exit code. 0 (zero) indicates the command ran successfully, and any other value (positive or negative) indicates failure.

Returns
  • the result of the command, with 0 meaning success and any other value meaning failure
Throws
IOException