Class SshFixtures<SELF extends SshFixtures<SELF>>

  • Type Parameters:
    SELF - the type of the subclass
    All Implemented Interfaces:
    dev.aherscu.qa.jgiven.commons.model.ScenarioType<SshScenarioType>

    @ThreadSafe
    public class SshFixtures<SELF extends SshFixtures<SELF>>
    extends dev.aherscu.qa.jgiven.commons.steps.GenericFixtures<SshScenarioType,​SELF>
    Generic SSH client fixtures. Sets up an SSH client configuration.
    Author:
    aherscu
    • Constructor Summary

      Constructors 
      Constructor Description
      SshFixtures()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SELF an_SSH_client_configuration​(net.schmizz.sshj.Config config)
      Sets up a specific SSH configuration; otherwise the DefaultConfig will be used.
      SELF connection_timeout​(int millis)
      Sets the connection timeout on the given SSH client; otherwise ConnectionDefaults.DEFAULT_CONNECTION_TIMEOUT.
      SELF execution_output_to​(OutputStream target)
      Sets the execution output on the given SSH client; otherwise System.err.
      SELF execution_timeout​(int millis)
      Sets the execution timeout on the given SSH client; otherwise ConnectionDefaults.DEFAULT_EXECUTION_TIMEOUT.
      SELF read_timeout​(int millis)
      Sets the read timeout on the given SSH client; otherwise ConnectionDefaults.DEFAULT_READ_TIMEOUT.
      • Methods inherited from class dev.aherscu.qa.jgiven.commons.steps.GenericFixtures

        nothing
      • Methods inherited from class dev.aherscu.qa.jgiven.commons.utils.StageEx

        alert, attach, attachScreenshot, attachScreenshot, attachScreenshot, beforeScenarioConfigurePolling, context, element, elements, ensureElements, retry, safely, scrollIntoView
      • Methods inherited from class com.tngtech.jgiven.Stage

        and, but, comment, given, then, when, with
      • Methods inherited from class com.tngtech.jgiven.base.StageBase

        $, $, self
    • Field Detail

      • configuration

        @ProvidedScenarioState
        protected final ThreadLocal<net.schmizz.sshj.Config> configuration
        The given SSH client configuration.
      • connectionTimeout

        @ProvidedScenarioState
        protected final ThreadLocal<Integer> connectionTimeout
        The given SSH client connection timeout.
      • executionOutput

        @ProvidedScenarioState
        protected final ThreadLocal<OutputStream> executionOutput
        The given SSH remote stream redirection target.
      • executionTimeout

        @ProvidedScenarioState
        protected final ThreadLocal<Integer> executionTimeout
        The given SSH remote execution timeout.
      • readTimeout

        @ProvidedScenarioState
        protected final ThreadLocal<Integer> readTimeout
        The given SSH client read timeout.
    • Constructor Detail

      • SshFixtures

        public SshFixtures()
    • Method Detail

      • an_SSH_client_configuration

        public SELF an_SSH_client_configuration​(net.schmizz.sshj.Config config)
        Sets up a specific SSH configuration; otherwise the DefaultConfig will be used.
        Parameters:
        config - the configuration to use
        Returns:
        StageBase.self()
      • connection_timeout

        public SELF connection_timeout​(int millis)
        Sets the connection timeout on the given SSH client; otherwise ConnectionDefaults.DEFAULT_CONNECTION_TIMEOUT.
        Parameters:
        millis - the read timeout interval, in milliseconds.
        Returns:
        StageBase.self()
      • execution_output_to

        public SELF execution_output_to​(OutputStream target)
        Sets the execution output on the given SSH client; otherwise System.err.
        Parameters:
        target - the target output stream
        Returns:
        StageBase.self()
      • execution_timeout

        public SELF execution_timeout​(int millis)
        Sets the execution timeout on the given SSH client; otherwise ConnectionDefaults.DEFAULT_EXECUTION_TIMEOUT.
        Parameters:
        millis - the read timeout interval, in milliseconds.
        Returns:
        StageBase.self()
      • read_timeout

        public SELF read_timeout​(int millis)
        Sets the read timeout on the given SSH client; otherwise ConnectionDefaults.DEFAULT_READ_TIMEOUT.
        Parameters:
        millis - the read timeout interval, in milliseconds.
        Returns:
        StageBase.self()