Class SshClient

  • All Implemented Interfaces:
    Named, Endpoint, com.consol.citrus.messaging.Consumer, com.consol.citrus.messaging.Producer, com.consol.citrus.messaging.ReplyConsumer, com.consol.citrus.messaging.SelectiveConsumer

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

      • SshClient

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

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

      • 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 com.consol.citrus.messaging.Producer
        Parameters:
        message - the message object to send.
        context -
      • receive

        public Message receive​(TestContext context)
        Specified by:
        receive in interface com.consol.citrus.messaging.Consumer
      • receive

        public Message receive​(String selector,
                               TestContext context)
        Specified by:
        receive in interface com.consol.citrus.messaging.SelectiveConsumer
      • receive

        public Message receive​(TestContext context,
                               long timeout)
        Specified by:
        receive in interface com.consol.citrus.messaging.Consumer
      • receive

        public Message receive​(String selector,
                               TestContext context,
                               long timeout)
        Specified by:
        receive in interface com.consol.citrus.messaging.SelectiveConsumer
      • createProducer

        public com.consol.citrus.messaging.Producer createProducer()
        Specified by:
        createProducer in interface Endpoint
      • createConsumer

        public com.consol.citrus.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 -