This commit is contained in:
rasta5man 2025-04-16 21:46:50 +02:00
commit b8e528dfff
5 changed files with 383 additions and 0 deletions

49
ServerBuilder.java Normal file
View 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;
}
}