49 lines
929 B
Java
49 lines
929 B
Java
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;
|
|
}
|
|
|
|
}
|
|
|