public static interface

Session.Command

implements Channel
net.schmizz.sshj.connection.channel.direct.Session.Command
Known Indirect Subclasses

Class Overview

Command API.

Summary

Public Methods
abstract InputStream getErrorStream()
Returns the command's stderr stream.
abstract String getExitErrorMessage()
If the command exit violently with a signal, an error message would have been received and can be retrieved via this method.
abstract Signal getExitSignal()
Returns the signal if the command exit violently, or null if this information was not received.
abstract Integer getExitStatus()
Returns the exit status of the command if it was received, or null if this information was not received.
abstract Boolean getExitWasCoreDumped()
If the command exit violently with a signal, information about whether a core dump took place would have been received and can be retrieved via this method.
abstract void signal(Signal signal)
Send a signal to the remote command.
[Expand]
Inherited Methods
From interface java.io.Closeable
From interface net.schmizz.sshj.common.ErrorNotifiable
From interface net.schmizz.sshj.common.SSHPacketHandler
From interface net.schmizz.sshj.connection.channel.Channel

Public Methods

public abstract InputStream getErrorStream ()

Returns the command's stderr stream.

public abstract String getExitErrorMessage ()

If the command exit violently with a signal, an error message would have been received and can be retrieved via this method. Otherwise, this method will return null.

public abstract Signal getExitSignal ()

Returns the signal if the command exit violently, or null if this information was not received.

public abstract Integer getExitStatus ()

Returns the exit status of the command if it was received, or null if this information was not received.

public abstract Boolean getExitWasCoreDumped ()

If the command exit violently with a signal, information about whether a core dump took place would have been received and can be retrieved via this method. Otherwise, this method will return null.

public abstract void signal (Signal signal)

Send a signal to the remote command.

Parameters
signal The signal
Throws
TransportException if error sending the signal