Package dev.aherscu.qa.jgiven.ssh.steps
Class SshFixtures<SELF extends SshFixtures<SELF>>
- java.lang.Object
-
- com.tngtech.jgiven.base.StageBase<SELF>
-
- com.tngtech.jgiven.Stage<SELF>
-
- dev.aherscu.qa.jgiven.commons.utils.StageEx<SELF>
-
- dev.aherscu.qa.jgiven.commons.steps.GenericFixtures<SshScenarioType,SELF>
-
- dev.aherscu.qa.jgiven.ssh.steps.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
-
-
Field Summary
Fields Modifier and Type Field Description protected ThreadLocal<net.schmizz.sshj.Config>
configuration
The given SSH client configuration.protected ThreadLocal<Integer>
connectionTimeout
The given SSH client connection timeout.protected ThreadLocal<OutputStream>
executionOutput
The given SSH remote stream redirection target.protected ThreadLocal<Integer>
executionTimeout
The given SSH remote execution timeout.protected ThreadLocal<Integer>
readTimeout
The given SSH client read timeout.
-
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 theDefaultConfig
will be used.SELF
connection_timeout(int millis)
Sets the connection timeout on the given SSH client; otherwiseConnectionDefaults.DEFAULT_CONNECTION_TIMEOUT
.SELF
execution_output_to(OutputStream target)
Sets the execution output on the given SSH client; otherwiseSystem.err
.SELF
execution_timeout(int millis)
Sets the execution timeout on the given SSH client; otherwiseConnectionDefaults.DEFAULT_EXECUTION_TIMEOUT
.SELF
read_timeout(int millis)
Sets the read timeout on the given SSH client; otherwiseConnectionDefaults.DEFAULT_READ_TIMEOUT
.
-
-
-
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.
-
-
Method Detail
-
an_SSH_client_configuration
public SELF an_SSH_client_configuration(net.schmizz.sshj.Config config)
Sets up a specific SSH configuration; otherwise theDefaultConfig
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; otherwiseConnectionDefaults.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; otherwiseSystem.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; otherwiseConnectionDefaults.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; otherwiseConnectionDefaults.DEFAULT_READ_TIMEOUT
.- Parameters:
millis
- the read timeout interval, in milliseconds.- Returns:
StageBase.self()
-
-