CommandFactory when the command is not
known, as it is supposed to always return a valid Command object.
| Modifier and Type | Field and Description |
|---|---|
| private ExitCallback | |
| private final String | |
| private OutputStream | |
| private InputStream | |
| private final String | |
| private OutputStream |
| Access | Constructor and Description |
|---|---|
| public |
| 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 boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public String | |
| public int | |
| public 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 | 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 | |
| command | back to summary |
|---|---|
| private final String command | |
| err | back to summary |
|---|---|
| private OutputStream err | |
| in | back to summary |
|---|---|
private InputStream in
| |
| message | back to summary |
|---|---|
| private final String message | |
| out | back to summary |
|---|---|
private OutputStream out
| |
| UnknownCommand | back to summary |
|---|---|
| public UnknownCommand(String command) | |
| destroy | back to summary |
|---|---|
| public void destroy(ChannelSession channel) Implements org. Doc from org. This method is called by the SSH server to destroy the command because the client has disconnected somehow.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getCommand | back to summary |
|---|---|
| public String getCommand() | |
| getMessage | back to summary |
|---|---|
| public String getMessage() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| 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.
| |
| 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- | |