public abstract class ExecutableCommand
extends java.lang.Object
com.maverick.sshd.ConfigurationContext and they
make use of the input/output streams provided to communicate with the client.| Modifier and Type | Field and Description |
|---|---|
protected SessionChannelServer |
session
The session channel instance on which this command is being executed
|
static int |
STILL_ACTIVE
Value returned from
getExitCode() to indicate that the process
is still active. |
| Constructor and Description |
|---|
ExecutableCommand() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allocatePseudoTerminal(java.lang.String term,
int cols,
int rows,
int width,
int height,
byte[] modes) |
abstract boolean |
createProcess(java.lang.String[] args,
java.util.Map<java.lang.String,java.lang.String> environment)
Create the process but wait for the
onStart() method before
performing any IO. |
abstract int |
getExitCode()
Get the exit code for this process.
|
java.io.InputStream |
getInputStream()
Get the STDIN InputStream for this process.
|
java.io.OutputStream |
getOutputStream()
Get the STDOUT OutputStream for this process.
|
SessionChannel |
getSession() |
java.io.OutputStream |
getStderrOutputStream()
Get the STDERR OutputStream for this process.
|
void |
init(SessionChannelServer session)
Initialize the command.
|
abstract void |
kill()
Kill the command.
|
abstract void |
onStart()
Called once the command has been started.
|
void |
start()
Start the command.
|
public static final int STILL_ACTIVE
getExitCode() to indicate that the process
is still active.protected SessionChannelServer session
public void init(SessionChannelServer session)
session - public SessionChannel getSession()
public abstract boolean createProcess(java.lang.String[] args,
java.util.Map<java.lang.String,java.lang.String> environment)
onStart() method before
performing any IO.cmd - environment - public void start()
public abstract void onStart()
public abstract void kill()
public abstract int getExitCode()
STILL_ACTIVE.public java.io.OutputStream getOutputStream()
public java.io.OutputStream getStderrOutputStream()
public java.io.InputStream getInputStream()
public boolean allocatePseudoTerminal(java.lang.String term,
int cols,
int rows,
int width,
int height,
byte[] modes)
Copyright © 2022. All rights reserved.