Files
VisualSapfor/src/_VisualDVM/Passes/SSH/ConnectionPass.java

33 lines
899 B
Java
Raw Normal View History

2024-10-14 12:14:01 +03:00
package _VisualDVM.Passes.SSH;
2024-10-14 15:19:13 +03:00
import Common.Passes.Pass;
2024-10-09 22:21:57 +03:00
import _VisualDVM.GlobalData.Machine.Machine;
import _VisualDVM.GlobalData.User.User;
import _VisualDVM.TestingSystem.DVM.UserConnection;
2024-10-09 23:37:58 +03:00
public class ConnectionPass<T> extends Pass<T> {
public User user = null;
2024-10-14 15:19:13 +03:00
protected Machine machine = null;
//--
2024-10-14 15:19:13 +03:00
protected void Connect() throws Exception {
user.connection = null;
user.connection = new UserConnection(machine, user);
}
2024-10-14 15:19:13 +03:00
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();
}
//--
2024-10-14 15:19:13 +03:00
protected void ServerAction() throws Exception {
}
}