промежуточный. частичный рефакторинг инициализации. еще не готов.

This commit is contained in:
2023-12-20 02:47:47 +03:00
parent c228832c94
commit 8edb0ba16b
27 changed files with 151 additions and 60 deletions

View File

@@ -0,0 +1,34 @@
package Visual_DVM_2021.Passes.SSH;
import GlobalData.Machine.Machine;
import GlobalData.User.User;
import TestingSystem.DVM.UserConnection;
import Visual_DVM_2021.Passes.Pass_2021;
public class ConnectionPass_2023<T> extends Pass_2021<T> {
protected Machine machine = null;
protected User user = null;
//--
protected void Connect() throws Exception{
user.connection = null;
user.connection = new UserConnection(machine, user);
System.out.println("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено.");
}
void Disconnect(){
if (user.connection!=null){
user.connection.Disconnect();
user.connection = null;
}
}
@Override
protected void body() throws Exception {
Connect();
ServerAction();
}
@Override
protected void performFinish() throws Exception {
Disconnect();
}
//--
protected void ServerAction() throws Exception{
}
}