initial
This commit is contained in:
commit
b8e528dfff
5 changed files with 383 additions and 0 deletions
49
ServerBuilder.java
Normal file
49
ServerBuilder.java
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
package handleSsh;
|
||||
|
||||
public class ServerBuilder {
|
||||
private String host = null;
|
||||
private String username = "unipi";
|
||||
private String password = "unipi.technology";
|
||||
private String path = "/home/unipi";
|
||||
private int port = 22;
|
||||
|
||||
public ServerBuilder() { }
|
||||
|
||||
public Server buildServer()
|
||||
{
|
||||
return new Server(host, username, password, path, port);
|
||||
}
|
||||
|
||||
|
||||
public ServerBuilder host(String host)
|
||||
{
|
||||
this.host = host;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ServerBuilder username(String username)
|
||||
{
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ServerBuilder password(String password)
|
||||
{
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ServerBuilder path(String path)
|
||||
{
|
||||
this.path = path;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ServerBuilder port(int port)
|
||||
{
|
||||
this.port = port;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue