Command executions
| Modifier and Type | Field and Description |
|---|---|
| private ExitCallback | |
| protected boolean | |
| private Future | |
| protected volatile Thread | |
| private final String | |
| private Environment | |
| private OutputStream | |
| protected CloseableExecutorService | |
| private InputStream | |
| private OutputStream | |
| private ServerSession |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | destroy(ChannelSession
The channel)ChannelSession through which the command has been receivedImplements org. This method is called by the SSH server to destroy the command because the client has disconnected somehow. |
| public String | |
| public Environment | |
| public OutputStream | |
| public CloseableExecutorService | |
| public ExitCallback | |
| public InputStream | |
| public OutputStream | |
| public ServerSession | |
| public ServerSession | |
| protected Future | |
| protected void | |
| protected void | |
| public void | setErrorStream(OutputStream
The err)OutputStream used by the shell to write its errorsImplements org. Set the error stream that can be used by the shell to write its errors. |
| public void | setExitCallback(ExitCallback
The callback)ExitCallback to call when shell is closedImplements org. Set the callback that the shell has to call when it is closed. |
| public void | setInputStream(InputStream
The in)InputStream used by the shell to read input.Implements org. Set the input stream that can be used by the shell to read input. |
| public void | setOutputStream(OutputStream
The out)OutputStream used by the shell to write its outputImplements org. Set the output stream that can be used by the shell to write its output. |
| public void | setSession(ServerSession
The session)ServerSession in which this shell will be executed.Implements org.
|
| public void | start(ChannelSession
The channel, Environment ChannelSession through which the command has been receivedThe env)EnvironmentImplements org. Starts the command execution. |
| public String |
| callback | back to summary |
|---|---|
| private ExitCallback callback | |
| cbCalled | back to summary |
|---|---|
| protected boolean cbCalled | |
| cmdFuture | back to summary |
|---|---|
| private Future<?> cmdFuture | |
| cmdRunner | back to summary |
|---|---|
| protected volatile Thread cmdRunner | |
| command | back to summary |
|---|---|
| private final String command | |
| environment | back to summary |
|---|---|
| private Environment environment | |
| err | back to summary |
|---|---|
| private OutputStream err | |
| executorService | back to summary |
|---|---|
| protected CloseableExecutorService executorService | |
| in | back to summary |
|---|---|
| private InputStream in | |
| out | back to summary |
|---|---|
| private OutputStream out | |
| serverSession | back to summary |
|---|---|
| private ServerSession serverSession | |
| AbstractCommandSupport | back to summary |
|---|---|
| protected AbstractCommandSupport(String command, CloseableExecutorService executorService) | |
| destroy | back to summary |
|---|---|
| public void destroy(ChannelSession channel) throws Exception Implements org. Doc from org. This method is called by the SSH server to destroy the command because the client has disconnected somehow.
| |
| getCommand | back to summary |
|---|---|
| public String getCommand() | |
| getEnvironment | back to summary |
|---|---|
| public Environment getEnvironment() | |
| getErrorStream | back to summary |
|---|---|
| public OutputStream getErrorStream() | |
| getExecutorService | back to summary |
|---|---|
| public CloseableExecutorService getExecutorService() Implements org.
| |
| getExitCallback | back to summary |
|---|---|
| public ExitCallback getExitCallback() | |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() | |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() | |
| getServerSession | back to summary |
|---|---|
| public ServerSession getServerSession() Implements org.
| |
| getSession | back to summary |
|---|---|
| public ServerSession getSession() Implements org.
| |
| getStartedCommandFuture | back to summary |
|---|---|
| protected Future | |
| onExit | back to summary |
|---|---|
| protected void onExit(int exitValue) | |
| onExit | back to summary |
|---|---|
| protected void onExit(int exitValue, String exitMessage) | |
| setErrorStream | back to summary |
|---|---|
| public void setErrorStream(OutputStream err) Implements org. Doc from org. Set the error stream that can be used by the shell to write its errors.
| |
| setExitCallback | back to summary |
|---|---|
| public void setExitCallback(ExitCallback callback) Implements org. Doc from org. Set the callback that the shell has to call when it is closed.
| |
| setInputStream | back to summary |
|---|---|
| public void setInputStream(InputStream in) Implements org. Doc from org. Set the input stream that can be used by the shell to read input.
| |
| setOutputStream | back to summary |
|---|---|
| public void setOutputStream(OutputStream out) Implements org. Doc from org. Set the output stream that can be used by the shell to write its output.
| |
| setSession | back to summary |
|---|---|
| public void setSession(ServerSession session) Implements org.
| |
| start | back to summary |
|---|---|
| public void start(ChannelSession channel, Environment env) throws IOException Implements org. Doc from org. Starts the command execution. All streams must have been set before calling this method. The command
should implement
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |