public interface Command extends CommandLifecycle
Represents a command, shell or subsystem that can be used to send command.
This command have direct streams, meaning those streams will be provided by the ssh server for the shell to use directly. This interface is suitable for implementing commands in java, rather than using external processes. For wrapping such processes or using inverted streams,
seeInvertedShellWrapper
.Modifier and Type | Method and Description |
---|---|
void |
setErrorStream(OutputStream err)
Set the error stream that can be used by the shell to write its errors.
|
void |
setExitCallback(ExitCallback callback)
Set the callback that the shell has to call when it is closed.
|
void |
setInputStream(InputStream in)
Set the input stream that can be used by the shell to read input.
|
void |
setOutputStream(OutputStream out)
Set the output stream that can be used by the shell to write its output.
|
destroy, start
void setInputStream(InputStream in)
in
- The InputStream
used by the shell to read input.void setOutputStream(OutputStream out)
out
- The OutputStream
used by the shell to write its outputvoid setErrorStream(OutputStream err)
err
- The OutputStream
used by the shell to write its errorsvoid setExitCallback(ExitCallback callback)
callback
- The ExitCallback
to call when shell is closedCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.