Package org.citrusframework.ssh
Class SshCommand
java.lang.Object
org.citrusframework.ssh.SshCommand
- All Implemented Interfaces:
Runnable,org.apache.sshd.server.command.Command,org.apache.sshd.server.command.CommandDirectErrorStreamAware,org.apache.sshd.server.command.CommandDirectInputStreamAware,org.apache.sshd.server.command.CommandDirectOutputStreamAware,org.apache.sshd.server.command.CommandDirectStreamsAware,org.apache.sshd.server.command.CommandLifecycle
A command for delegation to a endpoint adapter
- Since:
- 1.3
- Author:
- Roland Huss
-
Constructor Summary
ConstructorsConstructorDescriptionSshCommand(String command, EndpointAdapter endpointAdapter, SshEndpointConfiguration endpointConfiguration) Constructor taking a command and the endpoint adapter as arguments -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy(org.apache.sshd.server.channel.ChannelSession session) Gets the command.voidrun()voidvoidsetExitCallback(org.apache.sshd.server.ExitCallback callback) voidvoidvoidstart(org.apache.sshd.server.channel.ChannelSession session, org.apache.sshd.server.Environment env)
-
Constructor Details
-
SshCommand
public SshCommand(String command, EndpointAdapter endpointAdapter, SshEndpointConfiguration endpointConfiguration) Constructor taking a command and the endpoint adapter as arguments- Parameters:
command- command performedendpointAdapter- endpoint adapterendpointConfiguration-
-
-
Method Details
-
start
public void start(org.apache.sshd.server.channel.ChannelSession session, org.apache.sshd.server.Environment env) throws IOException - Specified by:
startin interfaceorg.apache.sshd.server.command.CommandLifecycle- Throws:
IOException
-
run
public void run() -
destroy
public void destroy(org.apache.sshd.server.channel.ChannelSession session) - Specified by:
destroyin interfaceorg.apache.sshd.server.command.CommandLifecycle
-
setInputStream
- Specified by:
setInputStreamin interfaceorg.apache.sshd.server.command.CommandDirectInputStreamAware
-
setOutputStream
- Specified by:
setOutputStreamin interfaceorg.apache.sshd.server.command.CommandDirectOutputStreamAware
-
setErrorStream
- Specified by:
setErrorStreamin interfaceorg.apache.sshd.server.command.CommandDirectErrorStreamAware
-
setExitCallback
public void setExitCallback(org.apache.sshd.server.ExitCallback callback) - Specified by:
setExitCallbackin interfaceorg.apache.sshd.server.command.Command
-
getCommand
Gets the command.- Returns:
-