Class SshClient

java.lang.Object
org.citrusframework.endpoint.AbstractEndpoint
org.citrusframework.ssh.client.SshClient
All Implemented Interfaces:
Named, Endpoint, org.citrusframework.messaging.Consumer, org.citrusframework.messaging.Producer, org.citrusframework.messaging.ReplyConsumer, org.citrusframework.messaging.SelectiveConsumer

public class SshClient extends AbstractEndpoint implements org.citrusframework.messaging.Producer, org.citrusframework.messaging.ReplyConsumer
Ssh client connects to ssh server and sends commands to that server.
Since:
1.4
Author:
Roland Huss, Christoph Deppisch
  • Constructor Details

    • SshClient

      public SshClient()
      Default constructor initializing endpoint configuration.
    • SshClient

      protected SshClient(SshEndpointConfiguration endpointConfiguration)
      Default constructor using endpoint configuration.
      Parameters:
      endpointConfiguration -
  • Method Details

    • getEndpointConfiguration

      public SshEndpointConfiguration getEndpointConfiguration()
      Specified by:
      getEndpointConfiguration in interface Endpoint
      Overrides:
      getEndpointConfiguration in class AbstractEndpoint
    • send

      public void send(Message message, TestContext context)
      Send a message as SSH request. The message format is created from SshServer.
      Specified by:
      send in interface org.citrusframework.messaging.Producer
      Parameters:
      message - the message object to send.
      context -
    • receive

      public Message receive(TestContext context)
      Specified by:
      receive in interface org.citrusframework.messaging.Consumer
    • receive

      public Message receive(String selector, TestContext context)
      Specified by:
      receive in interface org.citrusframework.messaging.SelectiveConsumer
    • receive

      public Message receive(TestContext context, long timeout)
      Specified by:
      receive in interface org.citrusframework.messaging.Consumer
    • receive

      public Message receive(String selector, TestContext context, long timeout)
      Specified by:
      receive in interface org.citrusframework.messaging.SelectiveConsumer
    • createProducer

      public org.citrusframework.messaging.Producer createProducer()
      Specified by:
      createProducer in interface Endpoint
    • createConsumer

      public org.citrusframework.messaging.SelectiveConsumer createConsumer()
      Specified by:
      createConsumer in interface Endpoint
    • getJsch

      public com.jcraft.jsch.JSch getJsch()
      Gets the JSch implementation.
      Returns:
    • setJsch

      public void setJsch(com.jcraft.jsch.JSch jsch)
      Sets the JSch implementation.
      Parameters:
      jsch -
    • setCorrelationManager

      public void setCorrelationManager(CorrelationManager<Message> correlationManager)
      Sets the correlation manager.
      Parameters:
      correlationManager -