Package com.exasol.exasoltestsetup
Class SessionBuilder
- java.lang.Object
-
- com.exasol.exasoltestsetup.SessionBuilder
-
public class SessionBuilder extends Object
Builder forSession
-
-
Constructor Summary
Constructors Constructor Description SessionBuilder()Create new instance ofSessionBuilder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.jcraft.jsch.Sessionbuild()SessionBuilderconfig(String key, String value)Add an entry to this session's configuration.StringgetHost()intgetPort()StringgetUser()SessionBuilderhost(String value)SessionBuilderidentity(IdentityProvider value)SessionBuilderport(int value)SessionBuilderuser(String value)
-
-
-
Constructor Detail
-
SessionBuilder
public SessionBuilder()
Create new instance ofSessionBuilder
-
-
Method Detail
-
identity
public SessionBuilder identity(IdentityProvider value)
- Parameters:
value- identity provider to use for the session- Returns:
- instance of this for fluent programming
-
user
public SessionBuilder user(String value)
- Parameters:
value- user to be used by the session- Returns:
- instance of this for fluent programming
-
host
public SessionBuilder host(String value)
- Parameters:
value- host to be used by the session- Returns:
- instance of this for fluent programming
-
port
public SessionBuilder port(int value)
- Parameters:
value- port to be used by the session- Returns:
- instance of this for fluent programming
-
config
public SessionBuilder config(String key, String value)
Add an entry to this session's configuration.- Parameters:
key- key of the entryvalue- value of the entry- Returns:
- instance of this for fluent programming
-
build
public com.jcraft.jsch.Session build() throws com.jcraft.jsch.JSchException- Returns:
- new instance of SSH
Session - Throws:
com.jcraft.jsch.JSchException- if session creation fails
-
getUser
public String getUser()
- Returns:
- user added to this
SessionBuilder
-
getHost
public String getHost()
- Returns:
- host added to this
SessionBuilder
-
getPort
public int getPort()
- Returns:
- port added to this
SessionBuilder
-
-