public class SshCommand extends Object implements org.apache.sshd.server.command.Command, Runnable
| Constructor and Description |
|---|
SshCommand(String command,
EndpointAdapter endpointAdapter,
SshEndpointConfiguration endpointConfiguration)
Constructor taking a command and the endpoint adapter as arguments
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
String |
getCommand()
Gets the command.
|
void |
run() |
void |
setErrorStream(OutputStream err) |
void |
setExitCallback(org.apache.sshd.server.ExitCallback callback) |
void |
setInputStream(InputStream in) |
void |
setOutputStream(OutputStream out) |
void |
start(org.apache.sshd.server.Environment env) |
public SshCommand(String command, EndpointAdapter endpointAdapter, SshEndpointConfiguration endpointConfiguration)
command - command performedendpointAdapter - endpoint adapterendpointConfiguration - public void start(org.apache.sshd.server.Environment env)
throws IOException
start in interface org.apache.sshd.server.command.CommandLifecycleIOExceptionpublic void destroy()
destroy in interface org.apache.sshd.server.command.CommandLifecyclepublic void setInputStream(InputStream in)
setInputStream in interface org.apache.sshd.server.command.Commandpublic void setOutputStream(OutputStream out)
setOutputStream in interface org.apache.sshd.server.command.Commandpublic void setErrorStream(OutputStream err)
setErrorStream in interface org.apache.sshd.server.command.Commandpublic void setExitCallback(org.apache.sshd.server.ExitCallback callback)
setExitCallback in interface org.apache.sshd.server.command.Commandpublic String getCommand()
Copyright © 2008–2019 ConSol Software GmbH. All rights reserved.